Object Reference > True DBGrid Properties > ButtonPicture Property |
ButtonPicture Property
This property sets or returns the bitmap used to draw the in-cell button for the current cell in the specified column.
column.ButtonPicture= variant
Read/Write at run time and design time.
The in-cell button bitmap is enabled when any of the following are true:
· The column's Button property is set to True.
· The column's DropDown property is set to the name of a TDBDropDown control.
· The Presentation property of the column's ValueItems collection is set to 2 - Combo Box or 3 - Sorted Combo Box.
By default, True DBGrid uses a down arrow for the in-cell button.
However, you can change the button bitmap at design time using either the General or Columns property page. Or, you can assign a bitmap to the ButtonPicture property in code at run time:
TDBGrid1.Columns(1).ButtonPicture = LoadPicture("arrow.bmp")
Note
The grid automatically draws the edges corresponding to the button's up/down states as appropriate, so you need only provide the interior image (a light gray background is recommended).