WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStWidget class reference

ClearColumns

Removes the columns of a WS_LIST_CTRL widget.

Ole declaration

VARIANT_BOOL ClearColumnsByName(LPCTSTR sObjectName);

VARIANT_BOOL ClearColumnsById(SHORT usObjectId);

Parameters
sObjectName
The name of the target widget.
usObjectId
The id of the target widget.
Return Value

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

Remarks
Example
C#
using WirelessStudioOleWidgets;
WStWidget oWidget = new WStWidget();
short sListCtrlId= 4;
oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_LIST_CTRL, sListCtrlId, "", 0,0, 50, 50, "");
oWidget.AddColumById(sListCtrlId, 40, "Product Id");
oWidget.AddColumById(sListCtrlId, 40, "Description");
oWidget.AddColumById(sListCtrlId, 40, "Barcode");
oWidget.ClearColumnsById(sListCtrlId);
Visual Basic 6 (Full Example: ListCtrlDemoModule.bas)
Public wsWidget As New WStWidget
...
Case "clearColumnsBtn"
	'Removes the columns of the list ctrl
	wsWidget.ClearColumnsByName "myListCtrl"
...
See also

AddColumn | DeleteRow | SetRowText | SetRowIcon | AddRow | ClearRows | GetSelectedItem | ReadRowsFromFile | SetLoadMode

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