Posted: Sat May 11, 2002 9:09 pm
Restored from previous forum. Originally posted by tinman.
...at the minute I am resorting to this:
And I'm guessing there has to be a cleaner way. And what better than to have a refresh gadget command 
The reason I need it? Well it seems that my gadget resize code is a bit slow (I really doubt I can make it much faster, it has to be a general routine that can handle every GUI I throw at it) and if I run a CPU heavy program then the callback procedure I have set up gets cut short and not all my gadgets get redrawn (never mind at the new size - just not at all). So I need some way to redraw them once I get back to the main event loop (and that's where I use the HideGadget code from above).
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.10)
...at the minute I am resorting to this:
Code: Select all
HideGadget(x, 1) : HideGadget(x, 0)

The reason I need it? Well it seems that my gadget resize code is a bit slow (I really doubt I can make it much faster, it has to be a general routine that can handle every GUI I throw at it) and if I run a CPU heavy program then the callback procedure I have set up gets cut short and not all my gadgets get redrawn (never mind at the new size - just not at all). So I need some way to redraw them once I get back to the main event loop (and that's where I use the HideGadget code from above).
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.10)