ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
|||
|
|||
GUI combobox control
Hi, Flexsim users,
I use a combobox control in my GUI. It works fine, and I just want to give a flavor to the combobox. However, I couldn't get it yet. If a user select one option from the combobox list, I would like to inactivate the edit box not associated with it. For example, two options are available from the combobox. Two eidt boxes are also tied to the options. If Combobox option 1, then use and read value from edit box 1 If Combobox option 2, then use and read value from edit box 2 When the option 1 is selected, I would like to change the "viewwindowtype" attributes of the edit box 2 so that it is grayed out and vice versa <Honestly, I am not sure this is correct way, but it worked for me. value 101 is normal, 50 can grayed out based on my trial > The changing logic in 'OnSelect' under the combobox seems to work because I can see the value changes in the tree view. However, the actual eidt box would not updated. Interestingly, if I close the GUI and reopen it, it will update (grayed out). I think it could have something to do with refreshing logic (??) I tried repaintall, repaintallactive, repaintview, even buildall, etc. but none of them work. Could you please tell me what I can do? For your review, I upload the GUI model that could illustrate my issue. The edit boxes are not linked at all. It is simply made to test the OnSelect logic between the edit box and the combobox option. Any advice will be very much appreciated. Thanks! |
#2
|
||||
|
||||
Sung,
Always remember the first rule of GUI work: "If it can be, it should be, so pirate it." I am using 4.52 and in the switch to 4.5 the GUIs were greatly improved and as a result Phil Bobo redid most (if not all) of the GUIs. Don't let his hard work go to waste! Pirate it! If you look at the GUI for the Visual Tool you will notice that the combo box for the visual display will make certain options viewable and hide others. If you explore the structure of the GUI you will see that the OnSelect node of the combo box controls what is shown or hidden with the windowshow() command. If you don't want to hide things but gray them out then I would suggest looking at the flow page of any object GUI. The Use Transport check box has an OnPress node that grays certain controls out with the windowgray command. Good Luck, Brandon
__________________
thats not normal. |
The Following 2 Users Say Thank You to Brandon Peterson For This Useful Post: | ||
Vadim Fooks (12-17-2012) |
Thread | Thread Starter | Forum | Replies | Last Post |
itemcurrent in ComboBox | Neil Brandon | Q&A | 6 | 03-05-2010 09:52 AM |
Job Allocation using GUI Control | Anthony Timmiss | Q&A | 1 | 01-26-2009 11:29 AM |
Cell Control in a Rack | Gavin Douglas | Q&A | 2 | 10-22-2008 09:16 AM |
control Flexsim remotely | Martin Saler | Q&A | 1 | 12-14-2007 04:35 AM |