WireLess Studio Widgets Developer's Guide |
This methods retrieves the text displayed by an option on a WS_MENU.
BSTR GetOptionByName(LPCTSTR sObjectName, SHORT usOptionIndex);
BSTR GetOptionById(SHORT usObjectId, SHORT usOptionIndex);
On success, GetOption returns the displayed by the target option. On error GetOption returns an empty string. To get extended information, call WStError::GetLastErrorCode.
using WirelessStudioOleWidgets; WStWidget oWidget = new WStWidget(); short iMenuId= 4; oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_MENU, iMenuId, "", 0,0, 50, 50, ""); oWidget.ChangeMenuTypeById(iMenuId, (short)WSTWidgetConstants.WS_COMBO_BOX_MENU_TYPE); oWidget.AddOptionById(iMenuId, 0, "Show Menu"); oWidget.AddOptionById(iMenuId, 0, "Save File"); oWidget.AddOptionById(iMenuId, 0, "Close Application"); string sOption = oWidget.GetOptionById(iMenuId, 2);
Public wsWidget As New WStWidget ... Case "listBoxMenu" wsWidget.SetTextByName "optionSelected", "ListBoxMenu ( " + _ wsWidget.GetOptionByName("listBoxMenu", iIntValue) + " )" Case "buttonMenu" wsWidget.SetTextByName "optionSelected", "ButtonMenu ( " + _ wsWidget.GetOptionByName("buttonMenu", iIntValue) + " )" Case "comboBoxMenu" wsWidget.SetTextByName "optionSelected", "ComboBoxMenu ( " + _ wsWidget.GetOptionByName("comboBoxMenu", iIntValue) + " )" ...
AddOption | GetOption | ChangeMenuType | ClearOptions
WStWiget class reference | WStForm class reference | WStFactory class reference | WStError class reference
WireLess Studio by SofToGo S.A. | Visit our site www.softogo.com | Contact us help@softogo.com |