Here's a working POC of your code,
implementing a string gadget to circumvent Linux's larger minimum height for the editor gadget.
Code: Select all
OpenWindow(0, 0, 0, 640, 500, "Demo", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
container_width = 514
container_height = 52
If StartDrawing(WindowOutput(0))
match_window_colour = Point(10, 10)
StopDrawing()
EndIf
Container = CanvasGadget(#PB_Any, 1, WindowHeight(0) - 52, container_width, container_height, #PB_Canvas_Container)
If StartDrawing(CanvasOutput(Container))
Box(0, 0, container_width, container_height, match_window_colour)
StopDrawing()
EndIf
Editor_2 = StringGadget(#PB_Any, 1, 1, 512, 23, "")
SetGadgetColor(Editor_2, #PB_Gadget_BackColor, #Black)
SetGadgetColor(Editor_2, #PB_Gadget_FrontColor, #White)
B_Edit = ButtonGadget(#PB_Any, 4, 25, 100, 26, "F4-Edit")
B_Copy = ButtonGadget(#PB_Any, 106, 25, 100, 26, "F5-Copy")
B_Move = ButtonGadget(#PB_Any, 208, 25, 100, 26, "F6-Move")
B_MkDir = ButtonGadget(#PB_Any, 310, 25, 100, 26, "F7-Mkdir")
B_Delete = ButtonGadget(#PB_Any, 412, 25, 100, 26, "F8-Delete")
CloseGadgetList()
While WaitWindowEvent() ! #PB_Event_CloseWindow : Wend
Alternatively, if you don't need these gadgets to be in a container,
simply render them directly onto the window itself:
Code: Select all
OpenWindow(0, 0, 0, 640, 500, "Demo", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
editor_y = WindowHeight(0) - 52
button_y = WindowHeight(0) - 28
Editor_2 = StringGadget(#PB_Any, 1, editor_y, 512, 23, "")
SetGadgetColor(Editor_2, #PB_Gadget_BackColor, #Black)
SetGadgetColor(Editor_2, #PB_Gadget_FrontColor, #White)
B_Edit = ButtonGadget(#PB_Any, 4, button_y, 100, 26, "F4-Edit")
B_Copy = ButtonGadget(#PB_Any, 106, button_y, 100, 26, "F5-Copy")
B_Move = ButtonGadget(#PB_Any, 208, button_y, 100, 26, "F6-Move")
B_MkDir = ButtonGadget(#PB_Any, 310, button_y, 100, 26, "F7-Mkdir")
B_Delete = ButtonGadget(#PB_Any, 412, button_y, 100, 26, "F8-Delete")
While WaitWindowEvent() ! #PB_Event_CloseWindow : Wend
I hope it helps.