Discussions
Categories
Groups
Help
Home
User Community
Discussions
How to set layout title?
unknown
How do I change a title to a newly created layout window?
Script
Current Data Table() << layout;
Creates a new layout window titled "Layout:Untitled1"
Thanks!
Accepted answers
All comments
unknown
A workaround I found works like this:
dt<Window(Eval(NItems(Window())-1))<
It grabs a reference to the last created Display Box window and sets a new title
A more elegant way will be greatly appreciated
DonMcCormack
You can use the Current Window function. The trick is that it has to be submitted from a script launched from a button or menu. For example:
Current Data Table() << Layout;
Current Window() << Set Window Title("New Title");
will change the Layout window name. Note that if you run the above directly from a script, it will change the script window name to New Title because it would be the Current Window.
Hope this helps,
Don
Message was edited by: donMack@jmp
unknown
Thank you for your reply, but unfortunately I could not get it to work. If I run from the script window I get an error and if I run it form a menu item (scripts assigned to an item) layout stays "untitled".
For now I'm sticking with my own solution mentioned above.
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Help
Best Of