Gets or sets the image shown in a drop-down button in a column.
[Visual Basic]
Public Property ButtonPicture As Image
[C#]
public Image ButtonPicture {get;set;}
[Delphi]
public property ButtonPicture: Image read get_ButtonPicture write set_ButtonPicture;
Remarks
The in-cell button bitmap is enabled when any of the following are true:
· The column's C1DisplayColumn.Button property is set to True.
· The column's DropDown property is set to the name of a C1TrueDBDropdown control.
· The ValueItems.Presentation property of the column's ValueItems collection is set to Combo Box or Sorted Combo Box.
By default, True DBGrid uses a down arrow for the in-cell button. However, the button bitmap can be changed in the designer or in code.
Note: The grid automatically draws the edges corresponding to the button's up/down states as appropriate, so only the interior image needs provided.
Example
The following code assigns a bitmp to the ButtonPicture property:
Me.C1TrueDBGrid1.Columns(1).ButtonPicture = System.Drawing.Image.FromFile("C:\Seaside.bmp")
· C#
this.c1TrueDBGrid1.Columns[1].ButtonPicture = System.Drawing.Image.FromFile("C:\Seaside.bmp");
· Delphi
Self.C1TrueDBGrid1.Columns[1].ButtonPicture := System.Drawing.Image.FromFile('C:\Seaside.bmp');
See Also
C1DataColumn Class | C1DataColumn Members | C1.Win.C1TrueDBGrid Namespace
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |