I have finished my tookit, for LabVIEW and I would like to share it with LabVIEW community. I think, the quality UI become as important part of a LV code as a functionality itself nowdays. Customizing the LV Controls & Indicators can be done many ways, but what about the LV RTM? (Run Time Menu). Maybe the color of RTM can be chage (I'm not sure) but I clearly know there is no way to insert images into menuitems, that could improve the presence of our FP.
So, I've started to develop a control that may replace the "old-timer" LV RTM. Before saying some words about the toolkit please take a look at the attached pictures.
The pictures above show the ToolStrip can be used as Horizontal and Vertical dock.
The following docy types are supported:
Left / Top / Bottom
Right: (Not suggested - DropDownDirection)
The following ToolStripItems are supported already:
Simple Text filed
Nestable Item (dropdown)
and the following items are under development:
How to use:
The picture shows and example. (This VI is also available in the package with many more example.)
LabVIEW 2009 or later
.Net Framework 2.0 or later
Before use this toolkit, please visit: www.mvtech.eu for more information about usage.
Detalied documentation of VIs is also available here
Toolkit Download Link - the zipped file contains an exe. It is not neccessary to run the exe but makes your life easier if you dont want to copy the toolkit files into user.lib\ manually.
ToolStripButton and ToolStripLabel can be inserted dierctly to the ToolStripControl; can not be nested. (TS - AddItem.vi - ParentTag must be empty.)
Parent Tag must refer only ToolStripMenuItem.ItemTag or empty string.
I think, this is most interesting part of it
User Level: I want to simplify the event handlig as much as possible, so the user doesn't have to take care .Net Events and more. .Net ClickedEvent is registered for UserEvent and used in the top-level vi. The Event returns the ItemTag of the selected ToolStripItem. This ItemTag is used as a parameter of the following methods:
TS - RemoveItem.vi
TS - GetItemCheck.vi
TS - SetItemCheck.vi
TS - GetDisableItem.vi
TS - SetDisableItem.vi
For more info can be found on the website.
The picture above shows the event handling part of the code. The ItemTag <string> is an individual identifier of each ToolStripItem.
There are two types of checked-state. If a ToolStripMenuItem has any icon, the checked state dispalys as the "New" menuitem. Under the New menuitem, Open item has the same icon but its state is unchecked.
And if the menuitem doesn't have any icon, the standard pipe appears as its state is checked.
MenuEvents can be handled by Queue. Please check Example II. The Process Queue is responsible for ToolStrip Event handling. The Queue - Dequeue element returns the ToolStripItem ItemTag.
Password protection removed from subVIs. - Feel free to update or modify the source code.