Page 1 of 1
ResizeGadget()
Posted: Sun May 25, 2008 1:34 pm
by srod
Hi,
I always add code where appropriate to reduce flicker and such.
There have been a couple of instances now where much searching and tearing code (and hair!) apart has revealed a source of irritating flicker to be the ResizeGadget() command. Switching this for MoveWindow_() with the 'bRepaint' flag set to false has removed the flicker completely.
Could you perhaps therefore consider adding such a flag to the ResizeGadget() command (perhaps make it an optional parameter) ? I know opting not to repaint the gadget in question can lead to all kinds of repaint problems, but in my case I always have a lot of custom code for erasing and painting anyhow and consequently such an option is very useful.
Just thought it might help those working on Linux as well etc.
Thanks.
Posted: Sun May 25, 2008 1:46 pm
by milan1612
If this request is accepted (I strongly support it) then there should be a native
RepaintGadget() as well. It wouldn't make sense to use a native command and then
be forced to use the API to repaint the gadget...
Posted: Sun May 25, 2008 1:49 pm
by srod
You could accompilsh that with the same ResizeGadget() command - just use #PB_IGNORE and set the bRepaint flag!

Posted: Sun May 25, 2008 1:55 pm
by milan1612
OK, that's acceptable

Posted: Sun May 25, 2008 2:44 pm
by blueznl
srod wrote:You could accompilsh that with the same ResizeGadget() command - just use #PB_IGNORE and set the bRepaint flag!

Uh, sample please?
Posted: Sun May 25, 2008 2:45 pm
by srod
blueznl wrote:srod wrote:You could accompilsh that with the same ResizeGadget() command - just use #PB_IGNORE and set the bRepaint flag!

Uh, sample please?
A sample of what exactly? This is just a feature request.
Posted: Sun May 25, 2008 2:46 pm
by blueznl
Code?
Posted: Sun May 25, 2008 2:47 pm
by milan1612
blueznl wrote:srod wrote:You could accompilsh that with the same ResizeGadget() command - just use #PB_IGNORE and set the bRepaint flag!

Uh, sample please?
Code: Select all
ResizeGadget(Gadget.l, #PB_Ignore, #PB_Ignore, #PB_Ignore, #PB_Ignore, #True)
Where #True is the requested repaint flag...
Posted: Sun May 25, 2008 2:51 pm
by srod
You'll have to be more specific I'm afraid.
I have put in a simple request for the addition of a simple flag to the ResizeGadget() command. The addition of a snippet of code will add nothing to the arguments for or against such an addition as I think that my reasons for making the request are clear enough.
Either Fred/Timo will agree with the validity of my request of they will not, but I do not believe that either would require some code before making their decision.
Posted: Sun May 25, 2008 2:52 pm
by Fluid Byte
It's exactly like MoveWindow_() with the addtinal option to accept indexes along with handles.
Posted: Sun May 25, 2008 2:53 pm
by srod
Fluid Byte wrote:It's exactly like MoveWindow_() with the addtinal option to accept indexes along with handles.
Yes, but simply made crossplatform.
Posted: Sun May 25, 2008 3:10 pm
by AND51
> always add code where appropriate to reduce flicker and such.
> Could you perhaps therefore consider adding such a flag to the ResizeGadget() command
I hope, I understand you correctly, but do you know the urpose of SmartWindowRefresh()? It's exactly for reducing flickering.
In my opinion, this command should be improved, instead of modifying other principles.
(I hope, my opinion matches this topic...)
Posted: Sun May 25, 2008 3:22 pm
by srod
SmartWindowRefresh() is neither appropriate or effective in the situations in which I endeavour to combat flicker (and yes I did try it whilst hunting down the original problem). I am talking about working with individual gadgets -not the entire parent window etc.
Beside's, SmartWindowRefresh() is not something I would ever need because of all the custom painting and erasing which I usually undertake.
The purpose of my original post was not to point Fred/Timo towards some desperately needed feature (as using MoveWindow_() in my situation is pretty trivial) but to essentially request a crossplatform feature -nothing more!
