ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

Customizing the In-Cell Button Bitmap

By default, True DBGrid uses a down arrow for the in-cell button.

However, the button bitmap can be changed for a C1DisplayColumn object at design time by setting the ButtonPicture property in code:

·      Visual Basic

Me.C1TrueDBGrid1.Columns(0).ButtonPicture = System.Drawing.Image.FromFile("dollar.bmp")

·      C#

this.C1TrueDBGrid1.Columns[0].ButtonPicture = System.Drawing.Image.FromFile("dollar.bmp");

·      Delphi

Self.C1TrueDBGrid1.Columns[0].ButtonPicture := System.Drawing.Image.FromFile('dollar.bmp');

The grid automatically draws the edges corresponding to the button's up/down states as appropriate, so only the interior image of the button needs to be provided.


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.