How do I center vertically the glyph used to select/unselect Radio Button in first column.
--------
( )
-------- top grid line of row x
(O) Glyph showing Selected not centered vertically
-------- bottom grid line of row x
( ) Glyph showing UnSelected also not centered
--------
Thanks for your help...
This adds vertically centered radiobuttons in the grid:
procedure TForm1.AdvStringGrid1GetAlignment(Sender: TObject; ARow,
ACol: Integer; var HAlign: TAlignment; var VAlign: TVAlignment);
begin
VAlign := vtaCenter;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
advstringgrid1.DefaultRowHeight := 64;
advstringgrid1.AddRadioButton(1,1,false);
advstringgrid1.AddRadioButton(1,2,true);
end;
Hey Bruno
At RowHeight = 64 the RadioButton is roughly centered. At RowHeight = 21 the RadioButton is no longer centered vertically but on the bottom of the cell.
Set grid.ControlLook.RadioSize = 14