Gadget z-depth reversed?
Posted: Wed Sep 19, 2007 7:23 am
When I add new gadgets to a window the new gadgets will overlap the old ones. Ok, I get that. But why do the gadgets behind the overlapping gadgets have a higher priority?
Is there any way to force priority for foreground gadgets?
In this example button "two" is drawn on top of button "one". But if you click on the overlapping area the button in the back is activated instead of the one on top.
Here is another example with a scroll area
Is there any way to force priority for foreground gadgets?
In this example button "two" is drawn on top of button "one". But if you click on the overlapping area the button in the back is activated instead of the one on top.
Code: Select all
OpenWindow(0,640,480,120,100,"")
CreateGadgetList(WindowID(0))
ButtonGadget(0, 10, 10, 70, 50, "One")
ButtonGadget(1, 40, 40, 70, 50, "Two")
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
End
Code: Select all
OpenWindow(0,640,480,120,100,"")
CreateGadgetList(WindowID(0))
ScrollAreaGadget(0,10,10,70,50,140,100,30,#PB_ScrollArea_BorderLess)
CloseGadgetList()
ButtonGadget(2, 40, 40, 70, 50, "Two")
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
End