Developer

API Reference

IWidget_SetHintWidth()

Brew Release
Brew MP 1.0.2
See Also
WExtent IWidget IWidget_GetPreferredExtent() IWidget_SetPreferredExtent() IWidget_GetExtent()
Description
Sets the preferred width of the static widget. The preferred width is the size that the widget would choose to be under ideal circumstances. For example, a static widget might set its preferred width to the maximum width of the text to be displayed. However, the actual widget of the widget might be constrained by any number of factors -- the width of the display, the size of the container into which the text is to be displayed, the layout of the widget in relation to other objects on the display, etc. BREW will attempt to honor the width passed in IWidget_SetHintWidth(), but may choose a different size depending on these constraints.
Parameters
  • po
    []:
    Pointer to the IWidget object.
  • nWidth
    []:
    The preferred width for the widget.
Interface
Prototype
   int IWidget_SetHintWidth(IWidget *po, int nWidth);
Return
   AEE_SUCCESS - If the static widget is able to successfully set the preferred width.
   AEE_EFAILED - If the preferred width could not be set.
Side Effect
Calling IWidget_SetHintWidth() will send an EVT_WDG_SETPROPERTY event to the static widget requesting to set the PROP_HINT_WIDTH property.
Comment
Applications that specify that the static widget should wrap its text (by enabling the SWF_WRAPTEXT property flag) should call IWidget_SetHintWidth() to set the preferred width that will be returned by IWidget_GetPreferredExtent().
  • Follow