Prevent button from coming to top when focused.

FogLog

Registered User.
Local time
Today, 09:02
Joined
Feb 23, 2014
Messages
11
I currently have a button with a checkbox on top (z-axis wise). This works exactly like I want, except that whenever the button is clicked or focused, it gets brought to the top and hides the checkbox. Is there a simple way to prevent this?

The only idea I've been able to come up with is maybe making the button completely transparent, with an image of a button behind it. I'm hoping there might be a simpler method though.

Thanks in advance for any help.
 
Is there a simple way to prevent this?
Not so far as I am aware (in fact when I tried it, the button always defaults to top so the checkbox is never visible) but a couple of suggestions.

1. can you not located the checkbox to the left or right of the button?

2. create an image of the button with the click box on top and add it to the picture property of the button

then rather than use the click event, use the mousedown event and utilise the x/y coordinates to determine where the mouse is over the button - if it is over the checkbox image, action the checkbox event, otherwise action the button event (remove the code from the button click event
 

Users who are viewing this thread

Back
Top Bottom