WireLess Studio Widgets Developer's Guide |
Call this method to serialize and transfer the modifications made to a specific form and the widgets attached to it.
VARIANT_BOOL CommitChangesByName(LPCTSTR sFormName);
VARIANT_BOOL CommitChangesById(SHORT usFormId);
On success, CommitChanges returns TRUE, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.
If a widget is attached to more than one form the changes are transferred only to the form specified.
using WirelessStudioOleWidgets; WStWidget oWidget = new WStWidget(); WStFactory oFactory = new WStFactory(); WStForm oForm = new WStForm(); short formId = 10; short lineId = 15; oFactory.CreateFormById(formId); oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_LINE, lineId , "MyLine", 15, 15, 30, 30, ""); oForm.AddObjectBydId(formId, lineId ; oForm.ShowById(formId, true, true); oWidget.SetLineWidthById(lineId, 5); oForm.CommitChangesById(formId);
Public wsForm As New WStForm ... wsWidget.SetTextColorByName "line", iRed, iGreen, iBlue If bHorizontal Then wsWidget.SetOrientationByName "line", WS_ORIENTATION_HORIZ Else wsWidget.SetOrientationByName "line", WS_ORIENTATION_VERT End If bHorizontal = Not bHorizontal iWidth = Int((15 - 1 + 1) * Rnd + 1) wsWidget.SetLineWidthByName "line", iWidth bResult = wsForm.CommitChangesByName("myForm") ...
Show | SaveToTerminal | AddObject
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 |