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
|
||||
|
||||
Closing GUI Windows correctly
Hi all,
I've created my own Model Control GUI and I open from that GUI via the OnPress Trigger of an button another GUI: createview("MAIN:/project/model/Tools/GUIs/Testing GUI"); In that new GUI I've got a button which is supposed to close the new GUI. The code is: closeview(ownerview(c)); The window is closed, everything appears to work well. But when I save and reopen the model all the small "Testing GUI" windows that I've ever opened and closed afterwards are open again. I can close them again and you can believe me, it takes ages to close 50 or so windows. So here are my questions:
I'm also afraid there is nothing in the Documentation about that particular issue. So thanks for any help. Stephan
__________________
--- You can't have it both ways. |
#2
|
||||
|
||||
Quote:
What code is behind the little [x]?
__________________
--- You can't have it both ways. |
#3
|
||||
|
||||
Quote:
Greetings Carsten P.S.: The "x" is from windows and not flexsim code. |
The Following 3 Users Say Thank You to Carsten Seehafer For This Useful Post: | ||
Stephan Seidel (02-09-2012) |
#4
|
||||
|
||||
Closing a custom GUI per button
Many thanks, Carsten. Especially for pointing out the documentation on closeview. Apparently I was so disappointed by it, that I didnt even bother to look.
Just to post the complete code it in case someone is looking for it: Code:
closeview(ownerview(c)); destroyobject(ownerview(c)); Stephan
__________________
--- You can't have it both ways. |
The Following User Says Thank You to Stephan Seidel For This Useful Post: | ||
Carsten Seehafer (02-09-2012) |
Thread | Thread Starter | Forum | Replies | Last Post |
How to set dynamicaly closing node edge in a network node | Preethi Sivaramakrishnan | Tips and Tricks | 8 | 06-27-2013 01:35 PM |
Problem in opening and closing ports | claudia gertheinrich | Q&A | 3 | 01-22-2010 02:34 AM |
Keeping run speed after closing the model | Lydia Franck | Gripes and Goodies | 4 | 05-06-2009 03:38 AM |