Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Automatic GUI update after each change
Replies: 3   Last Post: Aug 11, 2011 12:38 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Ralph Schleicher

Posts: 28
Registered: 1/23/10
Re: Automatic GUI update after each change
Posted: Aug 11, 2011 11:34 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"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



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.