Toolbars are defined within ToolbarList section of the Menuset in XXX_TABITEMS.XML files, where XXX can be Fred4, Ted4, Shell4, Edadmin4 or Admin4.
This assumes that you've started a GN4 application, and that on your screen you are looking at the toolbar you want to locate in configuration files. 1.In Ted4 or Fred4, display Script Editor (Window > Palettes > Script Editor). 2.Click the Capture button. 3.On the Window menu, point to Toolbars, and then look at the tick marks before toolbar names: •If there's a tick mark before a toolbar name, then when you click the toolbar name, the toolbar will disappear from the screen. •If there's no tick mark before a toolbar name, then when you click the toolbar name, the toolbar will appear on the screen. 1.Click the toolbar name, and check if that's the toolbar you are interested about. If it's not, repeat the above until you locate the right toolbar. 2.Make a note of the name, displayed in the Script Editor. 3.Perform the search with that name, as explained in Locate scripts through Visual Studio Express search. 4.Double-click the found line to display the related file and to put the cursor in the related line in the file. Example You searched for MainToolbar. The following code was found. <ShellCommand(IsChecked:="Chk_IsToggleMainToolBar")> _ Public Sub ToggleMainToolBar() Main.ToggleToolBar(MainToolBar.Main, "Main", "Top", ToggleAction.Toggle) End Sub We highlighted above in yellow what's to be considered as the title of the toolbar to look for in the configuration files, and in cyan what's considered to be toolbar name. Note: there might be more names with the same root, e.g. ToggleMainToolbar, IsToggleMainToolbar, ToggleMainToolbarTracy, and so on. Make sure you've located the one that is exactly the same as the search term. |
1.Make a note of the toolbar title, and then add to it the following: <l:ShellToolBar Title="whatever" 2.Perform the search with that name, as explained in Locate scripts through Visual Studio Express search. 3.There will be one or more found lines, that may look like: C:\tera\GN4\main\config\global\GN4\fred4_TabItems.xml(1885): <l:ShellToolBar Title="Main" ShortTitle="Main" Name="MainToolbar"... C:\tera\GN4\main\config\global\GN4\fred4_TabItems.xml(3064): <l:ShellToolBar Title="Main" ShortTitle="Main" Name="MainTracy"... C:\tera\GN4\main\config\global\GN4\fred4_TabItems.xml(3254): <l:ShellToolBar Title="Main" ShortTitle="Main" Name="MainEdt"... Pick the line whose content of the Name="..." property is the same as the name of the toolbar. That's where starts the definition of the toolbar you are looking for. |