Curious if it's possible to set windowFlags from outside the actual panel which is being affect, say from a button which sits on that particular panel?
I've got around 50 panels which need to have the parameter "WindowStaysOnTopHint" set using:
setValue("","windowFlags","WindowStaysOnTopHint");
but I'm not so keen on modifying every single one, so thought I could use an already existing object_ref which sits on all of those panels and set the parameter from the initialise script on this obj_ref. Unfortunately this doesn't seem to want to work, I've been trying passing the name of the panel as the first parameter like this:
setValue(myPanelName(),"windowFlags","WindowStaysOnTopHint");
which returns an error saying object "###panel name###.pnl" doesn't exist. Also tried the following which also errors:
setValue(myModuleName() + "." + myPanelName(),"windowFlags","WindowStaysOnTopHint");
[Tried cutting out the ".pnl" at the end of the panel name - same thing, also an error.]
So my question is: can "windowFlags" for a particular panel be modified outside panel scripts, on panel shapes / object refs?
setting windowFlags from outside panel scripts
- tpjctrl
- Posts:145
- Joined: Tue May 08, 2018 10:30 am
setting windowFlags from outside panel scripts
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: setting windowFlags from outside panel scripts
If you want a module to be on top you can use the function stayOnTop() where you can define the module name.
Then you do not have to do it for every panel.
Best Regards
Leopold Knipp
Senior Support Specialist
Then you do not have to do it for every panel.
Best Regards
Leopold Knipp
Senior Support Specialist
- gschijndel
- Posts:376
- Joined: Tue Jan 15, 2019 3:12 pm
Re: setting windowFlags from outside panel scripts
Try it with the following shape name:
Code: Select all
setValue(myModuleName() + "." + myPanelName() + ":", "windowFlags", "WindowStaysOnTopHint");- tpjctrl
- Posts:145
- Joined: Tue May 08, 2018 10:30 am
Re: setting windowFlags from outside panel scripts
Thanks for the hint gschijndel, it's the ":" which was missing and causing errors.