![]() |
[android] resize component runtime
Hi, I need to resize all TRectangle in TFlowLayout on android.
It doesn't work for me.
Delphi-Quellcode:
Thank you
procedure TfrmMain.FormResize(Sender: TObject);
var i: integer; begin FlowLayout1.BeginUpdate; for I := 0 to FlowLayout1.ComponentCount -1 do begin if Components[i] is TRectangle then begin TRectangle(Components[i]).BeginUpdate; TRectangle(Components[i]).Width := (FlowLayout1.Width / 3) -10; TRectangle(Components[i]).EndUpdate; end; end; FlowLayout1.EndUpdate; end; |
AW: [android] resize component runtime
Two things:
1. What does happen for you? "It doesn't work" is a bit generic as a "failure message" 2. You are sure you want to öpost in English in the German branch of Delphipraxiy? Regards TurboMagic |
AW: [android] resize component runtime
Zitat:
I'm not German or American. Delphipraxis is a good forum, only some users can not advise, but only spam. I've already advised someone on the forum and I expect someone to advise me too!
Delphi-Quellcode:
var
i: integer; Item : TControl; begin for I := FlowLayout1.ControlsCount -1 downto 0 do begin Item := FlowLayout1.Controls[i]; Item.Width := (FlowLayout1.Width / 3) -10; Item.Height := Item.Width; end; |
AW: [android] resize component runtime
If you change your for loop from
Delphi-Quellcode:
to
FlowLayout1.ComponentCount
Delphi-Quellcode:
then it should work.
FlowLayout1.ControlsCount
|
AW: [android] resize component runtime
Zitat:
|
AW: [android] resize component runtime
Sometimes UI changes not always trigger a repaint for me.
An explicit .Repaint; might help to clarify. |
AW: [android] resize component runtime
Zitat:
And I usually do advise. But since there is an English speaking Delphipraxis branch available I see not much reason to post in English in the German one. I'm quite sure you would have gotten similar advice as you got here over there. There's simply no use having German forums when everybody starts talking in English there even when English ones do exist! |
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:27 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz