WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStWidget class reference

Show

This method shows or hides a specific widget.

Ole declaration

VARIANT_BOOL ShowByName(LPCTSTR sObjectName, VARIANT_BOOL bShow);

VARIANT_BOOL ShowById(SHORT usObjectId, VARIANT_BOOL bShow);

Parameters
sObjectName
The name of the target widget.
usObjectId
The id of the target widget.
bShow
Specifies whether a widget is shown or hidden. If this parameter is TRUE the widget will be shown, otherwise it will be hidden.
Return Value

On success, Show returns TRUE, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.

Remarks
Example
C#
using WirelessStudioOleWidgets;
WStWidget oWidget = new WStWidget();
WStFactory oFactory = new WStFactory();
short iFieldId = 77;
oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_FIELD, iFieldId, "", 0,0, 50, 50, "123");
oWidget.ShowById(iButtonId, False);	
Visual Basic 6 (Full Example: BasicPropertiesDemoModule.bas.txt)
Public wsWidget As New WStWidget
...
'Hides or shows the widgets
Case "visibleCheckBox"
	bVisible = Not bVisible
	wsWidget.ShowByName "topLine", bVisible
	wsWidget.ShowByName "button", bVisible
	wsWidget.ShowByName "label", bVisible
	wsWidget.ShowByName "checkBox", bVisible
	wsWidget.ShowByName "radioButton", bVisible
	wsWidget.ShowByName "progBar", bVisible
	wsWidget.ShowByName "field", bVisible
	wsWidget.ShowByName "listBox", bVisible
	wsWidget.ShowByName "comboBox", bVisible
	wsWidget.ShowByName "bottomLine", bVisible
...
See also

Enable | EnableTabStop

WStWiget class reference | WStForm class reference | WStFactory class reference | WStError class reference