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: 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 ]
srao12@asu.edu

Posts: 5
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]);
set(hbutton,'Callback',@Button_Callback)

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]

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