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: GUI related questions
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

Posts: 10
Registered: 9/17/12
GUI related questions
Posted: Nov 22, 2012 1:53 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hey guys, I figured I'd ask for some help here since it would take me a really long time to remember and figure out how GUI and it's functions work.

1. I have a pop-up menu with 3 selections. When each one is selected, I want it's inputs to be stored in a variable, when a user enter a value into a textbox. Each of those 3 values will be used to calculate a result of some equation when a user presses 'calculate' push button. I was thinking maybe have 3 text boxes, all hidden and on top of each other, until a user selects one of the choices of the pop up menu. But how can I store these values when a user goes from one option to the next? What's the syntax to make a textbox visible/invisible?

2. For the other inputs, I just have text boxes with a label next to them. To store a number as a variable I use this line a=str2num(get(handles.input1,'string')). what is the syntax to display an answer in another text box, I tried set(handles.output,'string',variblewithastring) but I get an error.

3. To make sure that each text box has an input, I can use isempty(variable) right? what about to make sure that all the inputs are numbers, and not letters? How do I display a pop up message saying which box has an incorrect input format?

any help is really appreciated. Thanks

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.