property Items.CellHasButton(Index as Long, ColIndex as Variant) as Boolean
Retrieves or sets a value indicating whether the cell has associated a push button.

TypeDescription
Index as Long A long expression that indicates the index of the item.
ColIndex as Variant A long expression that indicates the column's index, or a string expression that indicates the column's caption or column's key.
Boolean A boolean expression that indicates whether the cell has associated a push button.

The CellHasButton property specifies whether the cell display a button inside. When the cell's button is clicked the control fires CellButtonClick event. The caption of the push button is specified by the Caption property. Use the Def(exCellHasButton) property to assign buttons for all cells in the column. Use the Background property to change the visual appearance for cell's button.

The following VB sample assigns a button to the focused cell:

With List1.Items
    .CellHasButton(.FocusItem, 0) = True
End With 

The following C++ sample assigns a button to the focused cell:

#include "Items.h"
CItems items = m_list.GetItems();
items.SetCellHasButton( items.GetFocusItem(), COleVariant( (long)0 ), TRUE );

The following VB.NET sample assigns a button to the focused cell:

With AxList1.Items
    .CellHasButton(.FocusItem, 0) = True
End With

The following C# sample assigns a button to the focused cell:

axList1.Items.set_CellHasButton(axList1.Items.FocusItem, 0, true);

The following VFP sample assigns a button to the focused cell:

with thisform.List1.Items
	.CellHasButton(.FocusItem,0) = .t.
endwith