Recent

Author Topic: align a panel alClient in a scrollbox  (Read 670 times)

Hansvb

  • Hero Member
  • *****
  • Posts: 742
align a panel alClient in a scrollbox
« on: January 26, 2025, 10:52:23 am »
I don't understand the following. See the attachment.
panel8 has an align client with the idea that it fills the remaining space of the scroll box. But that seems to work differently than I think. If I have panels 6,7 and 8 completely in view and move the splitter between them, panel 8 fills the visible area completely. When I move the scroll bar of the scroll, panel 8 does not fill the entire area of ​​the scroll box?


Hansvb

  • Hero Member
  • *****
  • Posts: 742
Re: align a panel alClient in a scrollbox
« Reply #1 on: February 07, 2025, 04:29:57 pm »
Hi,

I'm finally a little bit further. But I'm making a mistake when determining the scrollboxHorzScrollBarRange. The range quickly becomes way too big when I drag the most left splitter. Is the function that determines the range called too often? (Not that i can see). Or is the fault somewhere else?
If I drag another splitter, the range is not adjusted at all while the function is called?

I must be overlooking something but have no idea what and where.

Hansvb

  • Hero Member
  • *****
  • Posts: 742
Re: align a panel alClient in a scrollbox
« Reply #2 on: February 07, 2025, 07:55:50 pm »
I now have a more or less working initial setup. The panels are placed on the scrollbox in the correct order. Even if it is not visible at the time the panels are placed (was a difficult thing). The only thing that is not yet as I would like is to enlarge/reduce the rightmost panel. That doesn't seem to be possible.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10835
  • Debugger - SynEdit - and more
    • wiki
Re: align a panel alClient in a scrollbox
« Reply #3 on: February 07, 2025, 09:13:04 pm »
I hadn't had time to download...

But do you have "AutoScroll" on or off?

If it is ON, then alClient in a scrollbox is a recursive size loop, afaik. I.e. the Scrollbox should be sizing its clientrect to fit the controls inside, but the alClient, would change its size to the (remainder of the) clientrect of the Scrollbox. So that I would not expect to work. But I don't know if there is a special define for that.

I also don't know how well the scrollbox does with all other ways controls could be aligned anchored, and require space as either a whole or a set of small groups of which the largest would have to be taken. (I did a quick test on akRight, and that seems to kinda work, with some small oddity)

Hansvb

  • Hero Member
  • *****
  • Posts: 742
Re: align a panel alClient in a scrollbox
« Reply #4 on: February 08, 2025, 09:45:04 am »
Quote
But do you have "AutoScroll" on or off?

This was the golden tip. I think I had turned that off somewhere during all the trials. I now also have resizing panels with splitters in a scrollbox working in my tool.

 

TinyPortal © 2005-2018