SetGadgetColor and StringGadget problem
Posted: Sun Nov 11, 2012 2:01 pm
Hi,
I have simple dll file with 2 simple procedure that receive external window handle and make a StringGadget on that window. everythings work fine except changing background color and text color of created StringGadgets. what's wrong?
Here is sample code for StringGadget creation:
This method works perfect for some gadgets such as TreeGadget!
I have simple dll file with 2 simple procedure that receive external window handle and make a StringGadget on that window. everythings work fine except changing background color and text color of created StringGadgets. what's wrong?
Here is sample code for StringGadget creation:
Code: Select all
ProcedureCDLL.s SetEditBoxBGColor()
If (io$ <> "") ; io$ is passed parameters from host window and that is global.
UseGadgetList(h.l) ; h.l is destination window handle which is global.
Delimiter$ = "|"
ObjectID = Val(StringField(io$, 1, Delimiter$))
ColorRed.l = Val(StringField(io$, 2, Delimiter$))
ColorGreen.l = Val(StringField(io$, 3, Delimiter$))
ColorBlue.l = Val(StringField(io$, 4, Delimiter$))
Color = RGB(ColorRed, ColorGreen, ColorBlue)
StringGadget(1, 8, 35, 306, 20, "1234567", #PB_String_Numeric)
SetGadgetColor(1, #PB_Gadget_BackColor, Color)
EndIf
EndProcedure
This method works perfect for some gadgets such as TreeGadget!