Gets or sets the Style object that controls the appearance of the RecordSelectors.
[Visual Basic]
Public Property RecordSelectorStyle As C1.Win.C1TrueDBGrid.Style
[C#]
public C1.Win.C1TrueDBGrid.Style RecordSelectorStyle {get;set;}
[Delphi]
public property RecordSelectorStyle: C1.Win.C1TrueDBGrid.Style read get_RecordSelectorStyle write set_RecordSelectorStyle;
Example
The following code uses the Style.Render method of the RecordSelectorStyle object to place the same text in every record selector:
Dim RecordSelectorTextBitmap As New Bitmap(Me.C1TrueDBGrid1.RecordSelectorWidth, C1TrueDBGrid1.RowHeight)
Dim RecordSelectorTextGraphics As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(RecordSelectorTextBitmap)
Me.C1TrueDBGrid1.RecordSelectorStyle.Render(RecordSelectorTextGraphics, New Rectangle(0, 0, Me.C1TrueDBGrid1.RecordSelectorWidth, Me.C1TrueDBGrid1.RowHeight), "Bob")
Me.C1TrueDBGrid1.RecordSelectorStyle.BackgroundImage = RecordSelectorTextBitmap
RecordSelectorTextGraphics.Dispose()
· C#
Bitmap RecordSelectorTextBitmap = new Bitmap(this.c1TrueDBGrid1.RecordSelectorWidth, C1TrueDBGrid1.RowHeight);
System.Drawing.Graphics RecordSelectorTextGraphics = System.Drawing.Graphics.FromImage(RecordSelectorTextBitmap);
this.c1TrueDBGrid1.RecordSelectorStyle.Render(RecordSelectorTextGraphics, new Rectangle(0, 0, this.c1TrueDBGrid1.RecordSelectorWidth, this.c1TrueDBGrid1.RowHeight), "Bob");
this.c1TrueDBGrid1.RecordSelectorStyle.BackgroundImage = RecordSelectorTextBitmap;
RecordSelectorTextGraphics.Dispose();
· Delphi
RecordSelectorTextBitmap := Bitmap.Create(Self.C1TrueDBGrid1.RecordSelectorWidth, C1TrueDBGrid1.RowHeight);
// var RecordSelectorTextGraphics : System.Drawing.Graphics;
RecordSelectorTextGraphics := System.Drawing.Graphics.FromImage(RecordSelectorTextBitmap);
Self.C1TrueDBGrid1.RecordSelectorStyle.Render(RecordSelectorTextGraphics, Rectangle.Create(0, 0, Self.C1TrueDBGrid1.RecordSelectorWidth, Self.C1TrueDBGrid1.RowHeight), 'Bob');
Self.C1TrueDBGrid1.RecordSelectorStyle.BackgroundImage := RecordSelectorTextBitmap;
RecordSelectorTextGraphics.Dispose;
See Also
C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |