This member of WaveLinkFactory Object is supported on: Palm, CE
The CreateMenubar method creates a menubar containing a set of menus. Each menu is associated with a pop-up list that activates when the user taps it.
VB
object.CreateMenubar WaveLinkMenubarInfo MenuBarInfo, WaveLinkWidgetCollection MyColl
VC++
HRESULT hr = object->CreateMenubar(WaveLinkMenubarInfo MenuBarInfo, WaveLinkWidgetCollection MyColl);
Parameters
MenuBarInfo |
The name of the WaveLinkMenubarInfo object to associate with the widget |
MyColl |
The name of the collection that will contain the widget |
Remarks
The menubar displays menu names based on stored RFMenu configurations. The menu configurations used by the menubar must be stored on the device before the menubar can access them. The menubar widget will return the menu index of the user-selected option.
Use the WaveLinkMenubarInfo object to create a list of menus for the menubar widget. When creating the widget object, the CreateMenubar method automatically calls the SetSpecialInfo method which assigns the formatted list of menus to the SpecialString property. If you want to modify the list of menus for the current menubar widget, use the SpecialString property.
Example
' VB Sample Code
Dim myMenInfo As New WaveLinkMenubarInfo
Dim mnuIface As New RFMenu
Dim myCollection As New WaveLinkWidgetCollection
Dim myFactory As New WaveLinkFactory
Dim myWidget As WaveLinkWidget
.
.
.
'Create the menus that will appear in the main menu bar
mnuIface.ResetMenu
mnuIface.AddTitleLine "Widget Demo's"
mnuIface.AddOption "Buttons"
mnuIface.AddOption "Pen Capture"
mnuIface.StoreMenu "MenOne"
mnuIface.ResetMenu
mnuIface.AddTitleLine "Exit"
mnuIface.AddOption "Quit"
mnuIface.StoreMenu "MenTwo"
'Insert the two menus into the WaveLinkMenuBarInfo object, using a -1 as the index automatically tacks the menu to the end of the list
myMenInfo.Insert -1, "MenOne"
myMenInfo.Insert -1, "MenTwo"
.
.
.
'Create the menubar
Set myWidget = myFactory.CreateMenubar myMenInfo, myCollection
myCollection.StoreWidgets
Was this article useful?
The topic was:
Inaccurate
Incomplete
Not what I expected
Other