Recent

Author Topic: Can't resize a child control  (Read 420 times)

tfurnivall

  • Jr. Member
  • **
  • Posts: 88
Can't resize a child control
« on: February 19, 2026, 10:35:46 pm »
I have a form with a width of 1600 and a height of 900, on which I have a multi-page control (width=1500, height=800). Each page in the multi-page command apparently has aTTabSheet component (width=1492, height=767).

I am trying to tidy up the various components, but I'm having trouble setting the dimensions of the TTab component (I'd like 1500, 800). Neither using the mouse to change the dimension nor using the Object Inspector to change the dimension works. The TTab is at (0,0) on the Multi-Page control, and the Multi-Page control is at (40,24) on the form (Left,Top co-ordinates).

I've experienced this before when AutoSize was set to true, but cannot figure out why this should be the case when it is set to false.

I've looked in the SourceForge wiki pages for both TPageControl and TTabSheet but see no likely candidates.

Any ideas?

Tony

jamie

  • Hero Member
  • *****
  • Posts: 7660
Re: Can't resize a child control
« Reply #1 on: February 19, 2026, 11:03:08 pm »
check the Align property and see if it's set for alCLIENT, that would cause that.
The only true wisdom is knowing you know nothing

wp

  • Hero Member
  • *****
  • Posts: 13484
Re: Can't resize a child control
« Reply #2 on: February 20, 2026, 01:24:56 am »
I've experienced this before when AutoSize was set to true, but cannot figure out why this should be the case when it is set to false.
Yes, usually when AutoSize=true, you cannot change the size of this control manually any more. "AutoSize" means: let the control itself adjust its size so that all relevant information can be displayed without scrolling.

Another situation in which you cannot control the size is for example a form containing two panels, one with Align=alLeft, the other one with Align=alClient - you will not be able to change the width of the alClient panel, you must change primarily the width of the alLeft panel.

Or, an advanced case (but extremely powerful): when you use the AnchorEditor to attach controls to each other you will not be able to resize or reposition these anchored controls (depending on the amound of anchoring that you apply).

And finally, when you use the ChildSizing property of a container to automatically layout controls inside this container you will also be out of luck to change anything in their size or position.

 

TinyPortal © 2005-2018