Problems with Pure Color and WindowCallback
Posted: Thu Sep 01, 2005 9:30 pm
I am trying to use the PureColor library and I am having a problem. If I include this line in my WindowCallBack() I get muted buttons.
Here's the code:
If I uncomment the ReturnValue line at the top I get coloring but muted buttons. I've used this other way of changing the colors on my listicongadget:
and it works, but it is not as nice as the one line Pure Colors. Also I can't use the other Pure Colors stuff.
Any ideas?
Finally, no matter which method I use, there is a textgadget that is colored every other time I open the window with the listicongadget on it. What's up with that?
Thanks. PB is the best!
Here's the code:
Code: Select all
Procedure WindowCallback(WindowID,Message,wParam,lParam)
ReturnValue = #PB_ProcessPureBasicEvents
;ReturnValue = PureCOLOR_CallBack(WindowID, Message, wParam, lParam, ReturnValue) ; <-------- add this line in your window callback
If Message = #WM_GETMINMAXINFO
ReturnValue = PVDynamic_LockWindow(WindowID,lParam)
EndIf
If Message = #WM_SIZE
ReturnValue = PVDynamic_Resize(WindowID)
EndIf
If Message = #WM_CTLCOLORSTATIC Or Message=#WM_CTLCOLOREDIT Or Message=#WM_CTLCOLORLISTBOX
ReturnValue = PVDynamic_ColorGadget(lParam,wParam)
EndIf
ProcedureReturn ReturnValue
EndProcedureCode: Select all
SendMessage_(GadgetID(Gadget_pickboard_data),#LVM_SETBKCOLOR,0,colorBKG)
SendMessage_(GadgetID(Gadget_pickboard_data),#LVM_SETTEXTBKCOLOR,0,colorBKG)
SendMessage_(GadgetID(Gadget_pickboard_data),#LVM_SETTEXTCOLOR,0,colorTXTAny ideas?
Finally, no matter which method I use, there is a textgadget that is colored every other time I open the window with the listicongadget on it. What's up with that?
Thanks. PB is the best!