If you like it simple, SetParent_() is your friend.
Code: Select all
OpenWindow(0,1,1,310,90,"Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
StringGadget(0,5,50,300,24,"Test")
ButtonGadget(1,276,0,20,20,">")
SetParent_(GadgetID(1), GadgetID(0)) ; <===== simple, but with redrawing problems
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
To get even a perfect redrawing, the bit more complex way (
edel (aka
hallodri) showed me some day) will be the best:
Code: Select all
hWnd = OpenWindow(0,#PB_Ignore,#PB_Ignore,250,50,"leer",#WS_OVERLAPPEDWINDOW)
StringGadget(0,10,10,200,22,"",#WS_CLIPSIBLINGS)
ButtonGadget(1,210-22,12,20,19,"...")
SetWindowPos_(GadgetID(0),#HWND_BOTTOM,0,0,0,0,#SWP_NOMOVE|#SWP_NOSIZE)
Repeat
event = WaitWindowEvent()
Until event = #PB_Event_CloseWindow