Lazarus

Programming => LCL => Topic started by: lainz on November 29, 2022, 10:23:05 pm

Title: [Solved] Z Order of Controls inside ScrollBox
Post by: lainz on November 29, 2022, 10:23:05 pm
Hi, I have a list of buttons that are created dynamically inside a TScrollBox. All buttons are aligned alTop. What I need to do is change the vertical order of these buttons, say I add two extra buttons outside, an arrow up and an arrow down, when I click on a button it becomes selected. When I click on the arrow down I want the selected button to move in the Z order, so it goes to bottom.

That's possible with LCL?
Title: Re: Z Order of Controls inside ScrollBox
Post by: lainz on November 29, 2022, 11:04:22 pm
Solved using FPObjectList and Move function.
Title: Re: [Solved] Z Order of Controls inside ScrollBox
Post by: KodeZwerg on November 29, 2022, 11:59:55 pm
Ohh, I always was doing such by calculating height of the position where I want to be and set that to the Top property but I might have misunderstood.
Title: Re: [Solved] Z Order of Controls inside ScrollBox
Post by: jamie on November 30, 2022, 12:16:31 am
Why not make them all invisible except for the one you want?
TinyPortal © 2005-2018