What is InvalidateRect_() ?
Posted: Sat Sep 04, 2010 11:12 am
I had a big problem: After a SetGadgetText(), the text is put in the gadget, but disappears as quickly as it was put.
The background is a graphical element (a gradient).
I solved the problem by adding InvalidateRect_() after each SetGadgetText().
What is InvalidateRect_()? I copied this from an existing code, but I would like to know what it exactly does, and what are the two parameters 0,1 ? And does ValidateRect_() also exist?
Thanks for clarify this mystery.
The background is a graphical element (a gradient).
I solved the problem by adding InvalidateRect_() after each SetGadgetText().
What is InvalidateRect_()? I copied this from an existing code, but I would like to know what it exactly does, and what are the two parameters 0,1 ? And does ValidateRect_() also exist?
Thanks for clarify this mystery.
Code: Select all
SetGadgetText(InfoGad(1),"Text1"):InvalidateRect_(GadgetID(InfoGad(1)),0,1)
SetGadgetText(InfoGad(2),"Text2"):InvalidateRect_(GadgetID(InfoGad(2)),0,1)
SetGadgetText(InfoGad(3),"Text3"):InvalidateRect_(GadgetID(InfoGad(3)),0,1)
SetGadgetText(InfoGad(4),"Text4"):InvalidateRect_(GadgetID(InfoGad(4)),0,1)