WireLess Studio Widgets Developer's Guide
WSWDG ContentsWStWidget class reference

SetUrlAddress

Changes the displayed page on a WS_HTML_CTRL widget.

Ole declaration

VARIANT_BOOL SetUrlAddressByName(LPCTSTR sObjectName, LPCTSTR sAddress);

VARIANT_BOOL SetUrlAddressById(SHORT usObjectId, LPCTSTR sAddress);

Parameters
sObjectName
The name of the target widget.
usObjectId
The id of the target widget.
sAddress
The URL address for the new page that will be loaded on the widget.
Return Value

On success, SetUrlAddress 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 iHtmlCtrl = 22;
oFactory .CreateWidgetById((short)WSTFactoryConstants.WS_HTML_CTRL, iHtmlCtrl, "", 0,0, 50, 50, "");
oWidget.SetUrlAddress(iHtmlCtrl , "http://www.softogo.com");
Visual Basic 6 (Full Example: HtmlCtrlDemoModule.bas.txt)
Public wsWidget As New WStWidget
...
Case "urlMenu"
	If wsWidget.GetSelectedItemByName("urlMenu") <> -1 Then
		wsWidget.SetUrlAddressByName "myHtmlCtrl", _
		wsWidget.GetOptionByName("urlMenu", wsWidget.GetSelectedItemByName("urlMenu"))
	End If
...
See also

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