Could this be useful?

Miscellaneous Forums/Blitz Showcase/Could this be useful?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I think its pretty good. You could of course put the whole thing inside another borderless panel and return that from the function, so that you can move it around/resize it etc. Try resizing the window with this sample below.

; Create a window and some labels 
win=CreateWindow("Labox Test",100,100,300,250);,0),17)
 
labox = CreateLabox(" Label",5,5,160,100,win) ; Labox Function.

SetGadgetLayout labox,1,1,1,1

Repeat 
Until WaitEvent()=$803 
End ; bye!  

Function CreateLabox(b_text$,b_x,b_y,b_width,b_height,b_parent)
	; Labox stand for Labeled Box :D
	Local pan = CreatePanel(b_x, b_y, b_width,b_height, b_parent)
	temp = CreatePanel( 0,5, b_width, 4, pan, 1)             ; Top
	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-3, 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, 32, 20, pan, 0)   ; Text
	SetGadgetLayout temp,1,0,1,0
	Return pan
End Function