I already used a toggle variable. But I really would like it being a button that is either pushed or 3D...
Well, I came up with this:
sync on : sync rate 0
startBlue "***", "***"
p = createPanel(5, 5, 32, 32, 0)
setPanelBorderStyle p, 2
toggle = 0
do
getEvent
if eventSource() = p and eventType() = 0x202
toggle = abs(toggle - 1)
if toggle = 1
setPanelBorderStyle p, 3
else
setPanelBorderStyle p, 2
endif
endif
sync
loop
Even though it's more like a workaround... Using the setPanelBorderStyle, you can create a 3D and sunken effect.
But then again, it's not a real button.
It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.