WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStWidget class reference

SetOrientation

This method allows to change the orientation of a WS_LINE widget.

Ole declaration

VARIANT_BOOL SetOrientationByName(LPCTSTR sObjectName, BYTE bOrientation);

VARIANT_BOOL SetOrientationById(SHORT usObjectId, BYTE bOrientation);

Parameters
sObjectName
The name of the target widget.
usObjectId
The id of the target widget.
bOrientation
The new orientation of the line.
Return Value

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

Remarks

The orientation can be set to one of the following constants:

The available orientation modes can be found on the WSTWidgetConstants enumeration.

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.SetOrientationById(iLineId , (short)WSTWidgetConstants.WS_ORIENTATION_VERT);
Visual Basic 6 (Full Example: ProgBarDemoModule.bas.txt)
Public wsWidget As New WStWidget
...
If bHorizontal Then
	wsWidget.SetOrientationByName "line", WS_ORIENTATION_HORIZ
Else
	wsWidget.SetOrientationByName "line", WS_ORIENTATION_VERT
End If
bHorizontal = Not bHorizontal
...
See also

SetLineWidth | SetTextColor

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