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 & Checkbox
I want to use a checkbox in my GUI, but it won't save it state. When I check the box, it is unchecked when I reopen the GUI. Do I have to use a coldlink or something?
Martin |
#3
|
|||
|
|||
Thanks
Phil, thanks for your reply. I thought I could use the command "getchecked" in an if statement with out saving the state in a global table. But it works with a coldlink as you showed me with your small model.
|
#4
|
||||
|
||||
You can use getchecked() and setchecked() in an if() statement if that's what you want to do.
You can also coldlink it to whatever node you want. I was just using a Global Table value for an example. The Parameters page of a queue shows a good example of a coldlinked variable on the Lifo checkbox. You can look at examples of GUI development by right clicking on most windows and going to View > Explore Structure. The path "@>objectfocus+>variables/lifo" is slightly complicated. The '@' symbol goes to the ownerview(). '>' dives into object data. '+' executes a string variable as a path and returns the node that it points to. (In this example, the ownerview's objectfocus is a path pointing to a certain queue.) Hopefully this helps for whatever it is you are trying to do. Last edited by Phil BoBo; 11-19-2014 at 06:30 PM. |