02-28-2022 03:54 AM
Hello
Is there a way to stack controls on eachother, hide the top control, but still have it "detect" the button press?
For example, you have 2 buttons, one in the foreground one in the background. The foreground one is placed in the same space as background and made invisible (or hidden).
If you do this with "hide control" function, the foreground one can not be pressed, only background; i want to have it the opposite, when foreground can be pressed but not the background.
Solved! Go to Solution.
02-28-2022 04:02 AM
You can make a button fully invisible still active: start with a flat button in the Classic palette, then make its colors transparent.
What's the role of the background button since it could not be clicked?
02-28-2022 04:10 AM
I'm just playing around for now, but the idea was that front button is latch action, while background is switch action.
02-28-2022 04:28 AM
You probably don't want to stack controls over each other.
One of them will always be "Frontmost" there actually is a Z-Order! You can even change it with the toolbar in edit mode. Unfortunately, you cannot change that at runtime.
You could try hiding them and changing their positions but that sounds like a hack to me.
So, let's clarify the UI Requirements! Once you write them down a solution will present itself.
02-28-2022 12:48 PM
@AeroSoul wrote:
Hello
Is there a way to stack controls on eachother, hide the top control, but still have it "detect" the button press? ... I want to have it the opposite, when foreground can be pressed but not the background.
Simply make the Foreground Button visible and put it "in front of" the Background Button. Now you can change which Button "gets pressed" simply by changing the visibility of the Foreground Button. I've done this in several of my programs.
Bob Schor