Jump to content

Refresh information on the UI from the code?


MadJik
 Share

Recommended Posts

I'm just not able to find the way to write a result of counting some pixels depending on conditions into the text of a label/textbox of the UI.

I'm missing that syntax and I would appreciate help from you for this part of code.

In the render section I want to change the text of a field on the dialog UI...

Hope it's clear enough!

Link to comment
Share on other sites

Your Render method doesn't have any direct way to communicate with the config dialog. You might be able to communicate somehow using the token, but I don't know if the token passed to the Render methods is a clone or the original from the dialog. Another way that I know works is to save a temp file. Just make sure that you do something to prevent your code from trying to write the file thousands of times at once, as that would be the tendency of the many Render threads.

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

Your Render method should not be communicating with the config dialog at all. It should pretend like it doesn't even exist. Especially because it actually truly might not exist -- take Ctrl+F for "Repeat [effect]", for instance.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

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.

Guest
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.

 Share

×
×
  • Create New...