Page 1 of 1
Newbie needs help, Buttons on rectangular graphic
Posted: Tue Oct 04, 2022 10:56 am
by CAsba
Hi there,
I want to lay out a card (page?) with columns of buttons (to call various actions), each 'column' being a different coloured rectangular graphic. I can't figure out how to show the buttons with the graphic in the background - buttons forward, graphic back. Is it possible ?
Re: Newbie needs help, Buttons on rectangular graphic
Posted: Tue Oct 04, 2022 11:31 am
by andresdt
Put a graphic and on top of it your buttons. Then group them and voila
Re: Newbie needs help, Buttons on rectangular graphic
Posted: Tue Oct 04, 2022 11:35 am
by CAsba
OK, thanks.
Re: Newbie needs help, Buttons on rectangular graphic
Posted: Tue Oct 04, 2022 12:02 pm
by Cairoo
Hi.
It could be as easy as just placing the buttons in front of the rectangular graphic.
To have the graphic behind the buttons, the layer of the graphic should just be lower than the layers of the buttons.
You can use the Project Browser to change the layer of the graphic by dragging the graphic up or down the list.
The layer property can also be changed in the property inspector, on the same tab as the width and height properties.
You can also set the layer in script.
Just be careful when changing the layer of a grouped control with the "relayer" command. If you change the layer of a grouped control (with the "relayer" command) to a value lower than the layer of the group itself, or to a value higher than the layer of the group's frontmost control, the control would be removed from the group.
Re: Newbie needs help, Buttons on rectangular graphic
Posted: Tue Oct 04, 2022 1:26 pm
by richmond62
You should feel 100% comfortable about putting any object either
overlapping or
on another object.
-
-
Re: Newbie needs help, Buttons on rectangular graphic
Posted: Tue Oct 04, 2022 1:30 pm
by richmond62
-
It is very easy to find out the
layer number of each object, and to change it if you need to.
Re: Newbie needs help, Buttons on rectangular graphic
Posted: Tue Oct 04, 2022 2:34 pm
by dunbarx
Hi.
Why not just use the graphic as the "button"? In other words, why have two controls when a single one will do? The graphics provide all the "visual" that you require, no?
So lose the buttons and place whatever handlers you require in the graphics themselves.
Now that said, you will likely be better served if you have a single handler in the card script that acts appropriately depending on which graphic the user clicks on. Have you ever tackled that before? It requires that each graphic be identifiable so that the card handler can use "the target" to perform its task based on the graphic of interest. You should do this even if you retain the button/graphic pairing. This method is fairly standard, very compact and much easier to manage.
If this seems like a good way forward, let me know, and I will help you.
Craig
Re: Newbie needs help, Buttons on rectangular graphic
Posted: Tue Oct 04, 2022 5:13 pm
by richmond62
Why not just use the graphic as the "button"? In other words, why have two controls when a single one will do?
That's OK is the OP wants a single button, but they may need 2 or 3 overlaying a rectangular graphic.
Re: Newbie needs help, Buttons on rectangular graphic
Posted: Tue Oct 04, 2022 7:35 pm
by dunbarx
What Richmond is positing is that you have multiple buttons with multiple functionality, all lying on a single graphic.
Is that so?
If yes, then what I posted reduces to simply strongly suggesting that a single handler in the card script manage all the functionality of those several buttons, however they are distributed about.
Craig