Skip to main content
1-Visitor
May 18, 2015
Solved

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

  • May 18, 2015
  • 1 reply
  • 1307 views

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

Best answer by pnagai

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.

1 reply

pnagai1-VisitorAnswer
1-Visitor
May 20, 2015

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.

pzorrilla1-VisitorAuthor
1-Visitor
June 1, 2015

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