Prev: function handles
Next: I PAY WHO CAN SOLVE MY Final Year Project until 24/03/2010. London Only please
From: Nischal on 21 Mar 2010 19:15 Hello, I want matlab to first create dialogue 'Input' with prompts...'A', 'B' and 'C'. Then 'Input' dialogue box should have all three prompts of A, B and C. Prompt B should have a default value of i.e. "99". I can do everything upto above... Now, I want all three prompts A, B and C of dalogue 'Input' to have drop down menu for predefined selection. How can I do that? thanks, Nick
From: Walter Roberson on 21 Mar 2010 22:25
Nischal wrote: > Hello, > > I want matlab to first create dialogue 'Input' with prompts...'A', 'B' > and 'C'. Then 'Input' dialogue box should have all three prompts of A, B > and C. Prompt B should have a default value of i.e. "99". > I can do everything upto above... > > Now, I want all three prompts A, B and C of dalogue 'Input' to have drop > down menu for predefined selection. How can I do that? In order to do that within inputdlg(), you would have to edit the matlab provided source. inputdlg() creates a modal dialog, so it does not return a handle to the box to allow you to customize what it does. If you are desperate, you could start a timer with a short timeout and a callback function, and then start the inputdlg() . The callback on the timer function would locate the handle to the figure that inputdlg() creates, and then go inside the figure and add the uicontrol's at the appropriate positions (this might require resizing the figure to fit the new entries.) A callback on a timer is about the only way to defeat the modal nature of the inputdlg(). |