I am using Xe7, Win 8.1
I have the next procedure to show messages in an delphi firemonkey app to android. I am not using explicit Styles.
This code works in firemonkey for windows but not in android app. I have tried several workarounds without success. It´s too easy to do work in windows but the problem is that my app will work on android device.
I have an TTExt into a CR(TCalloutRectangle) created at runtime. The height of TText is setting with Autosize:=True. I dont know the height of the TText before. Your height will change depending on message sent to procedure.
I need change CR(TCalloutRectangle) height to fit the TText.
The CR are added to VSB(VertScrollBox).
My problem is that CR never shows the correct height.
I also have tried use onResize and/or OnPaint events of TText with the code below but it´s not working as well.
Please, does someone can help me?
procedure TForm1.OnTextResize(Sender: TObject);
TCalloutRectangle(TText(Sender).Parent).height := TText(Sender).Height;
procedure TForm1.OnTextPaint(ASender : TObject; Canvas : TCanvas; const ARect : TRectF);
TCalloutRectangle(TText(ASender).Parent).height := Arect.Height
CR := TCalloutRectangle.Create(VSB);
CR.Parent := VSB;
CR.Align := TAlignLayout.alTop;
CR.CalloutPosition := TCalloutPosition.cpLeft;
CR.Margins.Top := 10;
CR.Margins.Bottom := 10;
CR.Margins.Right := 5;
CR.Height := 75;
L := TText.Create(Self);
L.Parent := CR;
with L.TextSettings do begin
L.Align := TAlignLayout.alClient;
L.Margins.Left := 15;
L.Margins.Right := 5;
L.Width := CR.Width-20;
L.WordWrap := True;
L.AutoSize := True;
L.Text := ‘Tit:’+Title+slinebreak+’GCMMsg:’+GCMMsg+slinebreak+