Page 1 of 1
Flickering
Posted: Tue Jan 19, 2010 10:37 am
by Enrico Maria Giordano
Dear friends, is there a way to get a flickering-free resize in the following sample?
Code: Select all | Expand
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
DEFINE DIALOG oDlg
oDlg:nStyle = NOR( oDlg:nStyle, WS_THICKFRAME )
@ 0, 0 TO 0, 0
@ 2, 2 SAY "This is a test"
oDlg:bResized = { || ResizeDlg( oDlg ) }
ACTIVATE DIALOG oDlg;
ON INIT ResizeDlg( oDlg );
CENTER
RETURN NIL
STATIC FUNCTION RESIZEDLG( oDlg )
LOCAL oGrp := oDlg:aControls[ 1 ]
oGrp:Move( 20, 20, oDlg:nWidth() - 40, oDlg:nHeight() - 60, .T. )
RETURN NIL
Thank you in advance.
EMG
Re: Flickering
Posted: Tue Jan 19, 2010 1:19 pm
by Colin Haig
Hi Enrico
STATIC FUNCTION RESIZEDLG( oDlg )
LOCAL oGrp := oDlg:aControls[ 1 ]
oGrp:Hide()
oGrp:Move( 20, 20, oDlg:nWidth() - 40, oDlg:nHeight() - 60, .T. )
oGrp:Show()
RETURN NIL
Colin
Re: Flickering
Posted: Tue Jan 19, 2010 2:15 pm
by Enrico Maria Giordano
Thank you. I just tried your suggestion but it's still flickering.
EMG
Re: Flickering
Posted: Tue Jan 19, 2010 2:46 pm
by nageswaragunupudi
Group box flickers when resized.
Even when the group box is not resized, it flickers when the container window is resized.
Known issue since long.
Re: Flickering
Posted: Tue Jan 19, 2010 5:59 pm
by Enrico Maria Giordano
Thank you.

EMG
Re: Flickering
Posted: Tue Jan 19, 2010 7:19 pm
by Antonio Linares
Enrico,
A solution could be to "paint" the groups instead of using real group controls:
Code: Select all | Expand
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
DEFINE DIALOG oDlg
oDlg:nStyle = NOR( oDlg:nStyle, WS_THICKFRAME )
@ 2, 2 SAY "This is a test"
oDlg:bResized := { || oDlg:Refresh() }
ACTIVATE DIALOG oDlg;
ON PAINT WndBox( hDC, 10, 10, oDlg:nHeight() - 49, oDlg:nWidth() - 26 ) ;
CENTER
RETURN NIL
This is just a test. We could use FWH nicer functions to paint the groups.
Also keep in mind that Class TSay does not use double buffer painting, so it will flicker too.
Re: Flickering
Posted: Tue Jan 19, 2010 10:15 pm
by Enrico Maria Giordano
Antonio Linares wrote:This is just a test. We could use FWH nicer functions to paint the groups.
That would be great.
Antonio Linares wrote:Also keep in mind that Class TSay does not use double buffer painting, so it will flicker too.
Can't you implement double buffer painting for TSay?
EMG
Re: Flickering
Posted: Tue Jan 19, 2010 10:34 pm
by nageswaragunupudi
Group control in window can act as a container of controls also.
It has its own advantages to use group as control. We need not code ON PAINT.
Will it help to have a paint method for group control with double buffering?
By the way, TSay does not flicker when window is resized.
Re: Flickering
Posted: Tue Jan 19, 2010 11:18 pm
by Enrico Maria Giordano
It flickers in my sample for me.
EMG
Re: Flickering
Posted: Mon Nov 13, 2017 7:43 am
by Otto
Hello,
any news on this.
Thanks in advance
Otto
Re: Flickering
Posted: Mon Nov 13, 2017 9:31 am
by Enrico Maria Giordano
I can't reproduce the problem anymore. It seems it has been fixed somehow.
EMG
Re: Flickering
Posted: Mon Nov 13, 2017 9:32 am
by Enrico Maria Giordano
And I don't remember what I was need it for...

EMG
Re: Flickering
Posted: Tue Nov 14, 2017 2:05 pm
by Otto
Hello,
in my case when resizing is finished the controls flicker till they are in the right position.
Is there any solution for this.
Thanks in advance
Otto


