property ComboBox.HasButtons as ExpandButtonEnum

Adds a button to the left side of each parent item.

TypeDescription
ExpandButtonEnum An ExpandButtonEnum expression that indicates whether the left side button of each parent item is visible or hidden.

The HasButtons property has effect only if the data is displayed as a tree. Use the InsertItem method to insert child items. The control displays a +/- button to parent items, if the HasButtons property is not zero, the ItemChild property is not empty, or the ItemHasChildren property is True. The user can click the +/- button to expand or collapse the child items. Use the ExpandItem property of Items object to programmatically expand/collapse an item. The HasButtonsCustom property specifies the index of icons being used for +/- signs on parent items, when HasButtons property is exCustom.

The following VB sample changes the +/- button appearance:

With ComboBox1
    .HasButtons = ExpandButtonEnum.exWPlus
End With

The following C++ sample changes the +/- button appearance:

m_combobox.SetHasButtons( 3 /*exWPlus*/ );

The following VB.NET sample changes the +/- button appearance:

With AxComboBox1
    .HasButtons = EXCOMBOBOXLib.ExpandButtonEnum.exWPlus
End With

The following C# sample changes the +/- button appearance:

axComboBox1.HasButtons = EXCOMBOBOXLib.ExpandButtonEnum.exWPlus;

The following VFP sample changes the +/- button appearance:

with thisform.ComboBox1
	.HasButtons = 3 && exWPlus
endwith