midora Posted April 8, 2021 Share Posted April 8, 2021 Setting the Description confuses the control. The link is no longer visible and the the Description Text looks destroyed (until I press Alt to male a screencopy 😉  2021-04-08 paint.net - UriProperty - Description hides link.png  Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted April 8, 2021 Share Posted April 8, 2021 I can't tell what's wrong just from the screenshot. What are you setting the property values to? Â Code that repros this would be useful. Really can't do much with a screenshot here. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
midora Posted April 8, 2021 Author Share Posted April 8, 2021 Reduced to the relevant code   protected override PropertyCollection OnCreatePropertyCollection() { // Add properties of all types and control types (always the variant with minimal parameters) List<Property> props = new List<Property> { new UriProperty(PropertyNames.UriProperty, new Uri("https://forums.getpaint.net")), }; // Add rules (this list may be empty or null) List<PropertyCollectionRule> propRules = new List<PropertyCollectionRule>() { }; return new PropertyCollection(props, propRules); } protected override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultConfigUI(props); configUI.SetPropertyControlValue(PropertyNames.UriProperty, ControlInfoPropertyNames.DisplayName, "UriProperty - LinkLabel (Default)"); configUI.SetPropertyControlValue(PropertyNames.UriProperty, ControlInfoPropertyNames.Description, "Description..."); return configUI; }  This from my PdnUiAllPropertyBasedControls test app.  You know I'm refactoring OBL in parallel . So I'm also using this pluging to check which PropertyControls allow which ControlInfoPropertyNames settings.  I checked which PropertyControl uses Footnote and figured out that Footnote is used only as Description for the BooleanProperty (I assume because Description is used for the text of the Checkbox and to change this would break most of the existing plugins. I would prefer a different solution. Allow ButtonText to set the text of the checkbox and if ButtonText is used then Description could get its standard meaning. but I understand that the internal code would be not so nice to implement such a solution)  Quote Link to comment Share on other sites More sharing options...
midora Posted April 8, 2021 Author Share Posted April 8, 2021 OK this maybe a misinterpretation . It seems now that Description is used to change the visible text of the link. But clicking still calls the real link. And Footnote does nothing. I don't think its a good idea that Description has two different meanings depending on the context. ButtonText would be a better candidate IMHO. Â Quote Link to comment Share on other sites More sharing options...
null54 Posted April 8, 2021 Share Posted April 8, 2021 35 minutes ago, midora said: It seems now that Description is used to change the visible text of the link. But clicking still calls the real link.  That is correct. If you hover over the link it will show a tool tip with the URL. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait  Link to comment Share on other sites More sharing options...
midora Posted April 8, 2021 Author Share Posted April 8, 2021 If Description is used for the visible Text then Footnote should be implemented to allow a Description below of the link text. Â Â Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.