ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 04-01-2009
Sung Kim Sung Kim is offline
Flexsim User
 
Join Date: Jan 2008
Location: York, PA
Posts: 85
Downloads: 70
Uploads: 0
Thanks: 70
Thanked 9 Times in 6 Posts
Rep Power: 160
Sung Kim is on a distinguished road
Default 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!
Attached Files
File Type: zip GUIBombo.zip (35.9 KB, 297 views)
  #2  
Old 04-01-2009
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

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


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.