WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStWidget class reference

SetLineWidth

Sets the line's width on a WS_LINE widget.

Ole declaration

VARIANT_BOOL SetLineWidthByName(LPCTSTR sObjectName, SHORT usWidth);

VARIANT_BOOL SetLineWidthById(SHORT usObjectId, SHORT usWidth);

Parameters
sObjectName
The name of the target widget.
usObjectId
The id of the target widget.
usWidth
The new width of the line.
Return Value

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

Remarks

The width is measured on pixels.

Example
C#
using WirelessStudioOleWidgets;
WStWidget oWidget = new WStWidget();
WStFactory oFactory = new WStFactory();
short iLineId = 44;
oFactory.CreateWidgetById((short)WSTFactoryConstants.WS_LINE, iLineId , "", 0,0, 50, 50, "");
oWidget.SetLineWidthById(iLineId , 5);
Visual Basic 6 (Full Example: LineDemoModule.bas.txt)
Public wsWidget As New WStWidget
...
'Widgets customization
wsWidget.SetTextColorByName "line", iRed, iGreen, iBlue
wsWidget.SetLineWidthByName "line", iWidth
...
See also

SetOrientation

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