analogue GetDlgCtrlID ()
analogue GetDlgCtrlID ()
how to get the id in Linux by Hendle?
Re: analogue GetDlgCtrlID ()
Wrong wrote, please insert topic of Linux
Re: analogue GetDlgCtrlID ()
To get a pb gadget number from a gadgetID
you will need to set a named property for the gadget
you will need to set a named property for the gadget
Code: Select all
Procedure SetOSGadgetID(gadget)
CompilerIf #PB_Compiler_OS = #PB_OS_Linux
g_object_set_data_(GadgetID(gadget),"OSGadgetID",Gadget))
CompilerElseIf #PB_Compiler_OS = #PB_OS_Windows
SetProp_(GadgetID(gadget),"OSGadgetID",Gadget)
CompilerEndIf
EndProcedure
Procedure GetOSGadgetID(OSGadgetID)
CompilerIf #PB_Compiler_OS = #PB_OS_Linux
ProcedureReturn g_object_get_data_(OSGadgetID,"OSGadgetID")
CompilerElseIf #PB_Compiler_OS = #PB_OS_Windows
ProcedureReturn GetProp_(OSGadgetID,"OSGadgetID")
CompilerEndIf
EndProcedure
Windows 11, Manjaro, Raspberry Pi OS


Re: analogue GetDlgCtrlID ()
Nice... Now I know the Set/GetProp... for Linux. Is there a variant for MacOs ?idle wrote:To get a pb gadget number from a gadgetID
you will need to set a named property for the gadget
Code: Select all
Procedure SetOSGadgetID(gadget) CompilerIf #PB_Compiler_OS = #PB_OS_Linux g_object_set_data_(GadgetID(gadget),"OSGadgetID",Gadget)) CompilerElseIf #PB_Compiler_OS = #PB_OS_Windows SetProp_(GadgetID(gadget),"OSGadgetID",Gadget) CompilerEndIf EndProcedure Procedure GetOSGadgetID(OSGadgetID) CompilerIf #PB_Compiler_OS = #PB_OS_Linux ProcedureReturn g_object_get_data_(OSGadgetID,"OSGadgetID") CompilerElseIf #PB_Compiler_OS = #PB_OS_Windows ProcedureReturn GetProp_(OSGadgetID,"OSGadgetID") CompilerEndIf EndProcedure
Re: analogue GetDlgCtrlID ()
Here, crossplattform without API: http://www.purebasic.fr/german/viewtopi ... 68#p319468
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: analogue GetDlgCtrlID ()
This one I knowts-soft wrote:Here, crossplattform without API: http://www.purebasic.fr/german/viewtopi ... 68#p319468
But I wanted to know the "API" way for MacOS .... like SetProp_() for windows.

