If nobody inferred this from what I just said, the number of query slots was increased from 50 to 100, therefore someone out there had a need for more than 50 query slots (and maybe more than one). I have noticed that more and more users are defining more and more queries and these long lists of queries sometime run off the screen. You can still select queries when the menu is bigger than the screen, it is just a pain to scroll the menu up and down to find the one you want. Back in version 4.0.x.9, a feature was introduced into GTViewer that allows you to build hierarchical menus in GTViewer, rather than the single level linear menus that have always been supported in the past. This new feature means that you can group queries and only show the group name on the Query menu. The group menu item will pop up the rest of the grouped items when it is selected. This feature is easier to show than to describe. Looking at the Electric/Gas sample data that is delivered with GTViewer, compare how a single level menu looks along side a hierarchical one:
Single Level Menu:
Granted, this is a very small example, but if you have 30, 40, or 50 menu items, you can see pretty easily how the group will help. The best thing about grouping your menu items is how easy it is to do. Look below at the two versions of the [Query Info] section to see how the Electric and Gas groups were defined in the example above:
Single Level Menu:
**** Note: I couldn't get the blog to show the pipe symbol correctly, so I just put "[pipe]
Now with a 100 menu slots available, this feature will be more important than ever; however, even with a handful of queries, you may still find a use for this feature.
This came in quite handy as the next day I started playing around with this for GTViewer and wondered if it could be applied to the ocx?
With GTVx 5.0, a new method has been added called QueryAvailableListEx. This method will return the group name for each menu as well as the name and id and should provide enough information to achieve the same type of menus.
Post a Comment