property G2antt.HasButtons as ExpandButtonEnum

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

   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 as an alternative to double-clicking the parent item, in case the ExpandOnDblClick property is True. 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 G2antt1
    .HasButtons = ExpandButtonEnum.exWPlus
End With

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

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

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

With AxG2antt1
    .HasButtons = EXG2ANTTLib.ExpandButtonEnum.exWPlus
End With

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

axG2antt1.HasButtons = EXG2ANTTLib.ExpandButtonEnum.exWPlus;

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

with thisform.G2antt1
	.HasButtons = 3 && exWPlus