Page 1 of 1

Posted: Sat May 11, 2002 9:09 pm
by BackupUser
Restored from previous forum. Originally posted by tinman.

...at the minute I am resorting to this:

Code: Select all

HideGadget(x, 1) : HideGadget(x, 0)
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)

Posted: Sat May 11, 2002 10:07 pm
by BackupUser
Restored from previous forum. Originally posted by fred.

The ResizeGadget() command coming with v3.10 has been fixed.. Could you confirm this ?

Fred - AlphaSND

Posted: Sat May 11, 2002 10:49 pm
by BackupUser
Restored from previous forum. Originally posted by tinman.
The ResizeGadget() command coming with v3.10 has been fixed.. Could you confirm this ?
Yes, the ResizeGadget() command works fine, but that is not the problem. The problem is that I have code like this:

Code: Select all

Procedure WindowsCallBack(...)
    Select Message
        Case #WM_SIZING ; Window is being resized
            Layout_ResizeGadgets() ; My own code
    EndSelect
EndProcedure
This allows the window and all gadgets to be resized on-the-fly (as Danilo pointed out in the Windows:Announcements forum).

However, I am currently running a program that is continually processing data. And now my code which used to work, no longer does. So it looks very much like the time you are allowed to spend in the event processing callback procedure is limited and I have went over that limit.


--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.10)