|
|
Re: Automatic GUI update after each change
Posted:
Aug 11, 2011 11:34 AM
|
|
"Martin Skodacek" <skodacek@post.cz> writes:
> Hello, I am programming complex gui with many edit boxes, > radiobuttons, radiobutton panels, sliders check box, etc. I am > interested, if it is possible to make automatic GUI update for whole > environment.
Yes.
> I mean, when I change one one value, others connections > will be changed.
That's how a GUI is supposed to work.
> How to do this, use some while(1) > pause(0.001) > ...code... > end > Where to place it? Thank you.
Oh, no! GUIs are event driven. In the event handler of a widget, mark the widget as "dirty" if it's state has changed. Then call an update procedure for your GUI. The update procedure has to check the "dirty" flags and update dependencies accordingly. After that, all widgets are "clean".
-- Ralph
|
|