WireLess Studio Widgets Developer's Guide |
Sets the icon displayed a by widget, currently only supported by WS_BUTTON.
VARIANT_BOOL SetIconByName(LPCTSTR sObjectName, SHORT usIconId);
VARIANT_BOOL SetIconById(SHORT usObjectId, SHORT usIconId);
SetIcon returns TRUE on success, FALSE otherwise. To get extended information, call WStError::GetLastErrorCode.
SetIcon always loads the 32x32 pixel version of the selected icon.
using WirelessStudioOleWidgets; WStWidget oWidget = new WStWidget(); WStFactory oFactory = new WStFactory(); short sButtonId = 4, sIconId = 33; oFactory .CreateWidgetById((short)WSTFactoryConstants.WS_BUTTON, sButtonId, "", 0,0, 50, 50, ""); oFactory.LoadExternalIcon(sIconId, WS_EXIT, @"\IconLib.dll"); oWidget.SetIconById(iButtonId, sFontId);
Public wsWidget As New WStWidget Public wsFactory As New WStFactory .. wsFactory.LoadExternalIcon 7, WS_EXIT, "iconlib.dll" wsWidget.SetIconByName "exitButton" ...
EnableSubmitMode | EnableFlatStyle | ShowBorder | WStFactory::LoadExternalIcon
WStWiget class reference | WStForm class reference | WStFactory class reference | WStError class reference
WireLess Studio by SofToGo S.A. | Visit our site www.softogo.com | Contact us help@softogo.com |