analogue GetDlgCtrlID ()
Posted: Tue Feb 25, 2014 8:42 pm
how to get the id in Linux by Hendle?
http://www.purebasic.com
https://www.purebasic.fr/english/
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
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
This one I knowts-soft wrote:Here, crossplattform without API: http://www.purebasic.fr/german/viewtopi ... 68#p319468