Hi,
I have a silly problem. I can't manage
to set the alignment at run time. I have even tried putting a begin
update around it. Code below. It works when I set the alignment to
taCenter but not to taLeftJustify.
Thanks,
Ken
procedure TMainForm.ShowInfo(const IsHelp:Boolean;const Info:String);
begin
lblMainInfo.BeginUpdate;
if IsHelp then
lblMainInfo.Alignment:=taLeftJustify
else
lblMainInfo.Alignment:=taCenter;
lblMainInfo.Caption:=Info;
lblMainInfo.EndUpdate;
MainInfoPanel.Visible:=True;
end;
I suspect it is because label.AutoSize=true.
Can you try with label.AutoSize= false
Fyi, in our internal update we already added support to make it work with label.AutoSize=true as well
I cannot see an issue here. I'd suggest to retest with the next update.
I am creating a TWebLabel at runtime
If I use
playerLabel.Alignment := taCenter;
[Error] Unit7.pas(255): Incompatible types: got "TCSSTextAlign" expected "TAlignment"
What am I missing please ?
Prefix the type (taCenter) by its proper namespace (I.e. unit where it is declared:
unitname.taCenter