

| Type | Description | |||
| Expanded as Boolean | A boolean expression that indicates the sign being changed. | |||
| Long | A long expression that indicates the icon being used for +/- signs on the parent items. |
The following VB sample assigns different icons for +/- buttons:
With Grid1
.BeginUpdate
.Images "gBJJgBAICAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx2PyGRyWTymVy2XzGZzWbzmdz2f0Gh0WjwEWH0r08ekEikgAkso184iGkicPjcU2+zjW4jTnZ++jbv4Tvjbu4fF48adAv5fI4XO4ka4fRjO+4G73UZ3na7IAgI="
.LinesAtRoot = exLinesAtRoot
.HeaderVisible = False
.HasButtons = exCustom
.HasButtonsCustom(False) = 1
.HasButtonsCustom(True) = 2
.FullRowSelect = False
.Columns.Add "Column 1"
With .Items
Dim h As HITEM
h = .AddItem("Item 1")
.InsertItem .InsertItem(h, , "SubItem 1.1"), , "SubItem 1"
.InsertItem h, , "SubItem 2"
End With
.EndUpdate
End With

The following C++ sample specifies different ( as in the screen shot ) +/- signs for the control:
#include "Items.h" #include "Columns.h" #include "Column.h" m_grid.BeginUpdate(); m_grid.Images( COleVariant( "gBJJgBAICAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx2PyGRyWTymVy2XzGZzWbzmdz2f0Gh0WjwEWH0r08ekEikgAkso184iGkicPjcU2+zjW4jTnZ++jbv4Tvjbu4fF48adAv5fI4XO4ka4fRjO+4G73UZ3na7IAgI=" ) ); m_grid.SetLinesAtRoot( -1 ); m_grid.SetHeaderVisible( FALSE ); m_grid.SetHasButtons( 4 /*exCustom*/ ); m_grid.SetHasButtonsCustom( FALSE, 1 ); m_grid.SetHasButtonsCustom( TRUE, 2 ); m_grid.GetColumns().Add( "Column 1" ); COleVariant vtMissing; V_VT( &vtMissing ) = VT_ERROR; CItems items = m_grid.GetItems(); long h = items.AddItem( COleVariant( "Item 1" ) ); items.InsertItem( h, vtMissing, COleVariant( "SubItem 1" ) ); items.InsertItem( h, vtMissing, COleVariant( "SubItem 2" ) ); m_grid.EndUpdate();
The following VB.NET sample specifies different ( as in the screen shot ) +/- signs for the control:
With AxGrid1
.BeginUpdate()
.Images("gBJJgBAICAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx2PyGRyWTymVy2XzGZzWbzmdz2f0Gh0WjwEWH0r08ekEikgAkso184iGkicPjcU2+zjW4jTnZ++jbv4Tvjbu4fF48adAv5fI4XO4ka4fRjO+4G73UZ3na7IAgI=")
.LinesAtRoot = EXGRIDLib.LinesAtRootEnum.exLinesAtRoot
.HeaderVisible = False
.HasButtons = EXGRIDLib.ExpandButtonEnum.exCustom
.set_HasButtonsCustom(False, 1)
.set_HasButtonsCustom(True, 2)
.Columns.Add("Column 1")
With .Items
Dim h As Long
h = .AddItem("Item 1")
.InsertItem(h, , "SubItem 1")
.InsertItem(h, , "SubItem 2")
End With
.EndUpdate()
End With
The following C# sample specifies different ( as in the screen shot ) +/- signs for the control:
axGrid1.BeginUpdate();
axGrid1.Images("gBJJgBAICAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx2PyGRyWTymVy2XzGZzWbzmdz2f0Gh0WjwEWH0r08ekEikgAkso184iGkicPjcU2+zjW4jTnZ++jbv4Tvjbu4fF48adAv5fI4XO4ka4fRjO+4G73UZ3na7IAgI=");
axGrid1.LinesAtRoot = EXGRIDLib.LinesAtRootEnum.exLinesAtRoot;
axGrid1.HeaderVisible = false;
axGrid1.HasButtons = EXGRIDLib.ExpandButtonEnum.exCustom;
axGrid1.set_HasButtonsCustom(false, 1);
axGrid1.set_HasButtonsCustom(true, 2);
axGrid1.Columns.Add("Column 1");
int h = axGrid1.Items.AddItem("Item 1");
axGrid1.Items.InsertItem(h, "", "SubItem 1");
axGrid1.Items.InsertItem(h, "", "SubItem 2");
axGrid1.EndUpdate();
The following VFP sample specifies different ( as in the screen shot ) +/- signs for the control:
with thisform.Grid1
.BeginUpdate()
local s
s = "gBJJgBAICAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls"
s = s + "1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx2PyGRyWTymVy2XzGZzWbzmdz2f0Gh0WjwEWH0r08ekEikgAkso184iGkicPjcU2+zjW4jTnZ++jbv4Tvjbu4fF48adAv5fI4XO4ka4fRjO+4G73UZ3na7IAgI="
.Images(s)
.LinesAtRoot = -1
.HeaderVisible = .f.
.HasButtons = 4 &&exCustom
local sT, sCR
sCR = chr(13) + chr(10)
sT = "HasButtonsCustom(True) = 2"+ sCR
sT = sT + "HasButtonsCustom(False) = 1"+ sCR
.Template = sT
.Columns.Add("Column 1")
With .Items
local h
h = .AddItem("Item 1")
.InsertItem(h, , "SubItem 1")
.InsertItem(h, , "SubItem 2")
EndWith
.EndUpdate()
endwith