I don't know if it is a bug or not, but as i was using the containergadget, i noticed that the documentation shows an extremely limited amount of compatible functions. As i had to get the current size of a container gadget, i tried to use gadgetheight() and gadgetwidth() with it and on windows 7 it worked fine.
My question is - which functions are actually supported by the containergadget? Is it limited by platform? The container gadget is hardly useful if it only supports the currently listed functions. So i would either need a replacement or the language / documentation needs an update?
ContainerGadget
Moderator: Documentation Editors
Re: ContainerGadget
Often, it is because of the specificities of windows, linux and osx that may not overlap.
Try to test the same code with windows, linux and osx and compare the different results.
M.
Try to test the same code with windows, linux and osx and compare the different results.
M.
Re: ContainerGadget
The ContainerGadget does not really exist under Windows and therefore has limited functions.
Link: viewtopic.php?f=3&t=57565&p=432070#p432070
Check Gadget EventType
Link: viewtopic.php?f=3&t=57565&p=432070#p432070
Check Gadget EventType
Code: Select all
;- TOP
Procedure DoEventContainer()
Select EventType()
Case #PB_EventType_LeftClick : Debug " Left mouse button click"
Case #PB_EventType_RightClick : Debug " right mouse button click"
Case #PB_EventType_LeftDoubleClick : Debug " Left mouse button double click"
Case #PB_EventType_RightDoubleClick : Debug " Right mouse button double click"
Case #PB_EventType_Focus : Debug " Get the focus."
Case #PB_EventType_LostFocus : Debug " Lose the focus."
Case #PB_EventType_Change : Debug " Content change."
Case #PB_EventType_DragStart : Debug " The user tries To start a Drag & Drop operation."
Case #PB_EventType_Resize : Debug " The gadget has been resized. DX = " + GadgetWidth(0) + " / DY = " + GadgetHeight(0)
EndSelect
EndProcedure
Procedure DoEventResizeWindow()
ResizeGadget(0, 8, 8, WindowWidth(0) - 16, WindowHeight(0) - 16)
EndProcedure
If OpenWindow(0, 100, 100, 322, 150, "ContainerGadget", #PB_Window_SystemMenu | #PB_Window_SizeGadget)
ContainerGadget(0, 8, 8, WindowWidth(0) - 16, WindowHeight(0) - 16, #PB_Container_Raised)
ButtonGadget(1, 10, 15, 80, 24, "Button 1")
ButtonGadget(2, 95, 15, 80, 24, "Button 2")
CloseGadgetList()
BindEvent(#PB_Event_SizeWindow, @DoEventResizeWindow())
BindGadgetEvent(0, @DoEventContainer())
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: ContainerGadget
I don't understand, every gadget function should work with the ContainerGadget(), or do you mean eventtype ? No functions are specifically listed in the doc page: https://www.purebasic.com/documentation ... adget.html