cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Is there any way to lock menu bar if I'm creating a new window just for loading a report in my book?

pzorrilla
1-Visitor

Is there any way to lock menu bar if I'm creating a new window just for loading a report in my book?

Hello gurus and amateurs

So I'm creating different plugins for the editor in order to customize the functionality for my users; currently I'm looking a way for lock the menu bar when I create a new window, the option for create my customized window is inside a menu I created in the menu bar of Arbortext Editor, however if the window was created and someone clicks again the option, a new window will be created, so they are duplicated, I don't want to create a complete validation for this case since the window all it does is to load a report inside the document opened in editor, so I though in the option of locking the menu bar. Does anybody can help me with this?

Thank you so much in advance for your time and help.

Paulette AZ

ACCEPTED SOLUTION

Accepted Solutions
pnagai
12-Amethyst
(To:pzorrilla)

Hi Paulette,

I confess I don't 100% understand your situation. Maybe this will help, though. Do you give your new window a title? I usually do. Then, any time I'm opening a new window, I test open windows to see what is already open.

window_list(winarr, "help");

For example creates an array (winarr[]) of Help Windows that are currently open, that I can loop through and check for titles I recognize.

window_title_to_test = window_get(winarr[$i], "title");

If $window_title_to_test matches a particular type of window I have opened, I can decide whether or not to open the new window, close the old one, or ignore it.

Hope that helps.

View solution in original post

2 REPLIES 2
pnagai
12-Amethyst
(To:pzorrilla)

Hi Paulette,

I confess I don't 100% understand your situation. Maybe this will help, though. Do you give your new window a title? I usually do. Then, any time I'm opening a new window, I test open windows to see what is already open.

window_list(winarr, "help");

For example creates an array (winarr[]) of Help Windows that are currently open, that I can loop through and check for titles I recognize.

window_title_to_test = window_get(winarr[$i], "title");

If $window_title_to_test matches a particular type of window I have opened, I can decide whether or not to open the new window, close the old one, or ignore it.

Hope that helps.

Paul

I didn't know about the window_list() function. It works as you described, and it help me with another feature I have indeed.

Thank you so much.

Paulette

Announcements

Top Tags