Labox shouldnt have the problem, search for this in my code: <- Heres the error ?
Run the code look the top bar is over the others and its drawn before them.... whats wrong?
AppTitle "CL WARS"
; Create Main Window
w% = 300;GadgetWidth(Desktop()) - 100
h% = 300;GadgetHeight(Desktop()) - 100
x% = (ClientWidth(Desktop()) - w) / 2
y% = (ClientHeight(Desktop()) - h) / 2
wndMain = CreateWindow(" Coalition Legions WARS", x, y, w, h,0,17)
MainPanel = CreatePanel(0,0,295,200,wndMain,1)
lb_main = CreateLabox(" Player ",20,2,250,100,50,1,MainPanel)
;CreateButton("Options",0,0,100,20,MainPanel)
quit=False
Repeat
WaitEvent()
If EventID()=$803
If EventSource()=wndMain
quit=True
End If
EndIf
Until quit
Function CreateLabox(b_text$,b_x,b_y,b_width,b_height,lab_width,lab_style,b_parent)
Local pan = CreatePanel(b_x, b_y, b_width,b_height, b_parent)
temp = CreatePanel( 0,5, b_width, 4, pan, 1) ; Top <- Heres the error ?
SetGadgetLayout temp,1,1,1,0
temp = CreatePanel( 0, 5+2, 4, b_height-3, pan, 1) ; Left
SetGadgetLayout temp,1,0,1,1
temp = CreatePanel( 0, b_height-2, b_width,4, pan, 1) ; Bottom
SetGadgetLayout temp,1,1,0,1
temp = CreatePanel( b_width-3, 5, 4, b_height, pan, 1) ; Right
SetGadgetLayout temp,0,1,1,1
temp = CreateLabel( b_text$, 10, 0, lab_width, 16, pan, lab_style) ; Text
SetGadgetLayout temp,1,0,1,0
Return pan
End Function
|