WireLess Studio Widgets Developer's Guide |
This method gives the keyboard focus to a widget attached on a specific form.
VARIANT_BOOL SetFocusByName(LPCTSTR sFormName, LPCTSTR sObjectName);
VARIANT_BOOL SetFocusById(SHORT usFormId, SHORT usObjectId);
On success, SetFocus returns TRUE, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.
using WirelessStudioOleWidgets; WStFactory oFactory = new WStFactory(); WStForm oForm = new WStForm (); short formId = 10; short fieldId = 15; oFactory.CreateFormById(formId); oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_FIELD, fieldId, "myField", 15, 15, 30, 30, "Field"); oForm.AddObjectBydId(formId, fieldId); oForm.SetFocusById(formId, fieldId); oForm.ShowById(formId, true, true);
Public wsForm As New WStForm ... wsForm.SetFocusByName "myForm", "field" bResult = wsForm.ShowByName("myForm", True, True) ...
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 |