03-02-2006 09:30 AM
Hi Guys,
By "hijack" I meant that you can change the functionality of a standard icon along the top icon bar of each Panel in DIAdem. You can not change the number of icons along that top icon bar, but you can change the tip strip and functionality associated with each one. The only MenuItem..() functions which I can get to work with the icons are the MenuItemDel() and MenuItemChange() commands. The MenuItemChange() command associates a new tip strip and a new action with an existing icon. The MenuItemDel() command deletes any customization of that icon and retuns it to its normal ("unhijacked") behavior. The MenuItemDel() command does NOT remove an icon the way that it removes a menu.
While it's inconvenient that the MenuItemCount() function does not work on the icon bar, at least for a given version of DIAdem you are guaranteed that the number of icons is constant, since there is no programmatic way to remove them.
Note that in some cases there are invisible icons in the icon bar. For instance "I.4" in SCRIPT is invisible.
Icon = "I.6"
Call MenuItemDel("SCRIPT", Icon)
Call MenuItemChange("SCRIPT", Icon, "deactivated","msgbox ""deactivated""")
03-02-2006 09:36 AM
Hi Marc,
The MenuItemCountGet function specifices the number of items in a menu or submenu with the syntax of ReturnValue = MenuItemCountGet(WndName, MenuItemPos)
WndName specifies the name of the DIAdem panel.
MenuItemPos specifies the menu
There are several options for the MenuItemPos variable which are:
M – Specifies the position of a menu or of a menu item in the menu bar
C – Specifies the position of a menu item in a shortcut menu
I – Specifies the position of a button in the toolbar
The following example displays the number of menu items in the first submenu of the fifth menu in the DIAdem REPORT menu bar (5th menu = Settings 1st submenu = Layout Settings
Call MsgBoxDisp(“Number of menus: “ & MenuItemCountGet(“REPORT”, “M.5.1”))
For some more helpful information see the tutorial How to easily customize DIAdem with custom menus
Hope this helps!
Best Regards,
03-02-2006 11:56 AM
Hi,
Knowing that the Icons customisation is limited as Brad explained, now everything is clear. Thanks Brad.
Jonathan,
Thanks for your interest but I read some days ago the tutorial that you recommended and it’s very useful to work with the Menus but didn’t help at all with the Icons.
Thanks to all of you.
Best Regards,
Marc.
03-03-2006 03:38 AM
Hi Guys,
As Brad mentioned before its possible to change the appearance of those icons you can do it as follows:
In the DIAdem main folder you will see a folder call Symbols, normally corresponds to the following path: C:\Archivos de programa\National Instruments\DIAdem 9.1\Symbols
Inside this folder are all the icons used by DIAdem. Now if you want to change the appearance of a certain icon all that you have to do is to locate the “BMP” file that contains the image of the corresponding icon and to modify the corresponding area as you wish. Of course I recommend you to keep a copy of the original file.
You can change that file while DIAdem is running, so that allows you to do it with a certain VBS at any time. You can assign to it any function, as explained before… all that you have to do is to keep the original file name and to place it in the original path.
For example I did it with the Icon number 32 of the DIAdem Report… The file that contains that icon is “Report_00.bmp” if you want to tray I attached the modified file to this message…
Best Regards,
Marc.
02-21-2008 09:47 AM
InteractionOn()
- just like in KeyWait()
. Isn't there any easier way but taking care of each icon? Also the window icons (as NAVIGATOR, REPORT etc.) are still available.02-25-2008 10:51 AM
02-26-2008 03:21 AM
InteractionOn()
.03-13-2008 05:28 PM
Hi Yeti,
maybe I have a work around for You. You can switch the DIAdem window in a fullsize mode in which the panel bar as well as the menus and the icon bars disappear.
Try the following commands:
Call WndShow("VIEW","FullSize") 'Switch DIAdem to fullsize display
Call InteractionOn
Call WndShow("VIEW","Maximize") ''Switch DIAdem back to maximized window size
After that call Your dialog.
Unfortunately with this solution Your users have to switch off the Interaction Mode via the context menu (right hand mouse click).
Hope that helps.
ThomAC