The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: uicontrol callback not getting executed.
Replies: 1   Last Post: Nov 11, 2013 3:36 PM

Advanced Search

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

Posts: 6
Registered: 10/12/13
uicontrol callback not getting executed.
Posted: Nov 8, 2013 8:55 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi all,

I use uicontrol to add a push button to my figure which is basically a progressbar (progfig which I have defined as a persistent variable). My problem is that the callback function does not get executed at all even when I click on the button. I want the progressbar to have a cancel button which when the user clicks, he will get a warning asking if he wants to cancel for sure.

Here is my code :

progfig = figure(...
'Units', 'normalized',...
'Position', [left bottom width height],...
'NumberTitle', 'off',...
'Resize', 'off',...
'MenuBar', 'none' );

hbutton=uicontrol(progfig,'style','pushbutton','string','Cancel','Position', [550 0 100 20]);

Button_Callback is the function in which I have the warning message pop up and if the user wants to cancel, I end the operation.

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.