Grasshopper

algorithmic modeling for Rhino

There is a way to change wpf components without freezing the gui with ironpython 2.7?

So, I'm trying to make some function run without freezing the GUI. There is some way to change the text from a textblock in another thread? For example:

and my wpf:

I can't in any way that I try to change the text block in another thread. There is no way to make, for example, a infinite while loop to update data, without freezing the GUI?

Views: 970

Attachments:

Replies to This Discussion

Hi Felipe

I haven't tested your code as I would need your files for that (suggestion 3).
I would look at the first three answers proposed in this StackOverflow thread.

Please be aware, though: having it modeless (does not necessary need a new thread) will mean that the solution will finish computing. At that time, nothing in the definition will update with the values of your "textblock" (Control I suppose) when the user changes it. You will have to write code for that. I would actually still use WinForms if I had to just make something useful.

I hope this helps,

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Sorry for the images, but I just put images because of the indentation. Here the files if you want to test. Thanks for the answer! I will have a look in the link and try a solution.

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service