Vertical alignment of a cell with HTML

Dear support team,
I'm using, on some cells, HTML syntax to change colors, bold, and so on in part of the shown cell text, but the resulting text is always vertically aligned on TOP.
Grid has WordWrap set to False.

In the GetAlignment event any cell alignment is set:
procedure TWorkOrderManagementFrame.WorkOrdersGridGetAlignment(Sender: TObject; ARow, ACol: Integer; var HAlign: TAlignment; var VAlign: TVAlignment);
HAlign := taLeftJustify;
VAlign := tvaCenter;

procedure TWorkOrderManagementFrame.WorkOrdersGridGetDisplText(Sender: TObject; ACol, ARow: Integer; var Value: string);
if Data.DeadlineDateTime.AsInt64 = 0 then
Value := _('UNSET')
S := Data.DeadlineDateTime.GetAsString('dd/mm/yyyy', ' hh:nn');
Hours := HoursBetween(Now, Data.DeadlineDateTime.GetAsDateTime);
if Hours > 24 then
Value := S
else if Hours > 0 then
Value := '' + S + '' // html format but removed posting it
Value := '' + S + '' // html format but removed posting it

Thank you in advance for any suggestion.
Best Regards

HTML formatted text is using the alignment specifiers from the HTML itself, not what is set via OnGetAlignment()

I know there is a tag to align horizontally.
There is also a tag to align vertically the HTML text on a Cell ?

At this moment, mini HTML can do horiz. alignment via P tag with align attribute but there is no vertical alignment control.

1 Like