Jump to content

Recommended Posts

Posted

Use CSS for that.

Ok, thanks for help. Do you know the name of styles that UniGUI uses for the TUniStringGrid to modify the general appearance for this component for all forms where it is being used?.

Posted

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>

Posted

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.

  • 9 years later...
Posted
46 minutes ago, RobertoLopes said:

Still no cell alignment on stringgrid !!!! Why ? I cannot believe this.

Hello,

It seems that even in VCL there is no such possibility.

  • 1 month later...
Posted

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;

  • 7 months later...
Posted
4 minutes ago, webdev said:

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

Hello,

Which build of UniGUI are you using?

I couldn't reproduce your issue.

Join the conversation

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

Guest
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...