Jump to content

TUniStringGrid cells alignment


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);

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

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


Link to comment
Share on other sites

  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...