Jump to content

TUniStringGrid cells alignment


estrify

Recommended Posts

Push F12 in Mozilla/Chrome and see yourself... or better create your own element to style inside every cell, something like <span style="width: 100%; text-align: center;">test</span>

I eventually ended up using a TUniDBGrid with an in memory table to meet the features that TUniStringGrid doesn't have yet.

Thanks anyway.

Link to comment
Share on other sites

  • 9 years later...
  • 1 month later...

OnDrawCell event:

 

procedure MyForm.StringGrid1DrawCell(Sender: TObject; ACol,
  ARow: Integer; var Value: string; Attribs: TUniCellAttribs);
begin

    Attribs.Style.Style := 'text-align: right;';

    if ARow = 0 then
      Attribs.Style.Style := 'text-align: center';

end;

Link to comment
Share on other sites

  • 7 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...