ArcObjects Library Reference (Controls)  

IToolbarItem.Style Property

The style of the item. Displays a combination of text caption and bitmap.

[Visual Basic .NET]
Public Property Style As esriCommandStyles
[C#]
public esriCommandStyles Style {get; set;}
[C++]
HRESULT get_Style(
  esriCommandStyles* pVal
);
[C++]
HRESULT put_Style(
  esriCommandStyles pVal
);
[C++]

Parameters

pVal [out, retval]

  pVal is a parameter of type esriCommandStyles

pVal [in]

  pVal is a parameter of type esriCommandStyles

Product Availability

Available with ArcGIS Engine.

Description

Determines the Style of the item on the ToolbarControl, and whether the Caption, or Bitmap or Caption and Bitmap defined within the Command are displayed on the ToolbarControl. By default the Style is esriCommandStyleIconOnly. If the item has a Menu then the Style is fixed to a esriCommandStyleMenuBar Style.

Errors Returned

1049 800a0419: The supplied style is not valid for this Toolbar item

[C#]
IToolbarItem toolbarItem = axToolbarControl1.GetItem(0);
toolbarItem.Style = esriCommandStyles.esriCommandStyleIconAndText;
//Refresh the changes
axToolbarControl1.Update(0, true);
[Visual Basic .NET]
Dim pToolbarItem As IToolbarItem
pToolbarItem = AxToolbarControl1.GetItem(0)
pToolbarItem.Style = esriCommandStyles.esriCommandStyleIconAndText
'Refresh the changes
AxToolbarControl1.Update(0, True)

See Also

IToolbarItem Interface