Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: How to make TPanel child components resize on size change of parent TPanel


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Apr 26, 2017 2:43 PM Last Post By: Yusuf Husainy Threads: [ Previous | Next ]
Yusuf Husainy

Posts: 5
Registered: 5/20/17
How to make TPanel child components resize on size change of parent TPanel  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 22, 2017 11:04 AM
Hi All,

I am newbie to UI and forms, I have started with "Embarcadero RAD Studio 10.2 Tokyo C++ Builder", and am facing some trouble finding the right API to use. I am using C++ as the programming language.

I have a TPanel component on my FMX form, whose children include a PaintBox, another TPanel and 3 TLabels.

On a button click, I am able to resize the parent TPanel, but the child components do not resize themselves. I may have missed out calling an API, however, I searched through the API list of TPanel components, but could not find any. I also need to redo the font size of the child TLabel components when those TLabel do resize.

Is there a way this auto-scales up and down according to the size of the parent TPanel?

Googling this question created more stress, because it would not return anything closely relevant.

I appreciate any help :)

Regards,
Yusuf Husainy.
Yusuf Husainy

Posts: 5
Registered: 5/20/17
Re: How to make TPanel child components resize on size change of parent TPanel  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 26, 2017 2:43 PM   in response to: Yusuf Husainy in response to: Yusuf Husainy
Hi all,

I was able to solve this problem, seems I had not set the Align properties well enough. Thanks!

Yusuf Husainy wrote:
Hi All,

I am newbie to UI and forms, I have started with "Embarcadero RAD Studio 10.2 Tokyo C++ Builder", and am facing some trouble finding the right API to use. I am using C++ as the programming language.

I have a TPanel component on my FMX form, whose children include a PaintBox, another TPanel and 3 TLabels.

On a button click, I am able to resize the parent TPanel, but the child components do not resize themselves. I may have missed out calling an API, however, I searched through the API list of TPanel components, but could not find any. I also need to redo the font size of the child TLabel components when those TLabel do resize.

Is there a way this auto-scales up and down according to the size of the parent TPanel?

Googling this question created more stress, because it would not return anything closely relevant.

I appreciate any help :)

Regards,
Yusuf Husainy.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02