CreatePopupTrigger Method

This member of WaveLinkFactory Object is supported on: Palm, CE

The CreatePopupTrigger method creates a popup trigger that displays a pop-up list when the user taps it. The currently selected item appears to the right of the trigger.

VB

object.CreatePopupTrigger XCoord, YCoord, Width, Height, MenuName, InitialOption, MyColl

VC++

HRESULT hr = object->CreatePopupTrigger(short XCoord, short YCoord, short Width, short Height, BSTR MenuName, short InitialOption, WaveLinkWidgetCollection MyColl);

Parameters

XCoord

The starting left coordinate of the widget

YCoord

The starting top coordinate of the widget

Width

The horizontal extent of the widget. Pass a value of 0 to set the width automatically.

Height

The vertical extent of the widget. Pass a value of 0 to set the height automatically.

MenuName

The name of the RFMenu configuration associated with the widget

InitialOption

The initial menu-index value of the widget (for example, passing a 1 will indicate the first menu entry in the RFMenu configuration)

MyColl

The name of the collection that will contain the widget

Remarks

The popup trigger populates its menu options with a stored RFMenu configuration. The menu must be stored on the device before the popup trigger can access it. The widget will return the menu index of the user-selected option.

The CreatePopupTrigger method automatically stores the menu name associated with the current widget in the SpecialString property of the WaveLinkWidget object.

The DefaultCoordinateType property determines how the application interprets the values entered for the position, width, and height of the widget. You can set the size of the widget to AUTOSIZE by setting the width and height to zero (0). It is recommended that you use the AUTOSIZE setting for the height and width of the popup trigger. Using a value other than AUTOSIZE will not affect the size of the widget, only the extent of the clickable area surrounding it.

Example

' VB Sample Code
Dim wlfactory As New WaveLinkFactory
Dim wlmaincoll As New WaveLinkWidgetCollection
Dim WelcomeMenu As WaveLinkWidget
Dim wlmenu As New RFMenu
.
.
.
wlmenu.ResetMenu
wlmenu.SetMenuWidth 18
wlmenu.AddOption "Basic Car Wash"
wlmenu.AddOption "Basic Wash/Wax"
wlmenu.AddOption "Carnuba Wax"
wlmenu.AddOption "Interior Clean"
wlmenu.AddOption "Full Detail"
wlmenu.AddOption "Special Detail"
wlmenu.AddOption "Device Version"
wlmenu.AddOption "Exit"
wlmenu.StoreMenu "MainMenu"
.
.
.
Set WelcomeMenu = wlfactory.CreatePopupTrigger(3, 5, 0, 0, _
"MainMenu", 1, wlmaincoll)

wlmaincoll.StoreWidgets

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

Privacy and Legal