Jump to content

UriProperty Description issue

Recommended Posts

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.

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

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,
            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)


midoras signature.gif

Link to comment
Share on other sites

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.


midoras signature.gif

Link to comment
Share on other sites

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.


Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint 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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...