FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Flickering
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Flickering
Posted: Tue Jan 19, 2010 10:37 AM
Dear friends, is there a way to get a flickering-free resize in the following sample?

Code (fw): Select all Collapse
#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
Posts: 310
Joined: Mon Oct 10, 2005 05:10 AM
Re: Flickering
Posted: Tue Jan 19, 2010 01:19 PM

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

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Flickering
Posted: Tue Jan 19, 2010 02:15 PM

Thank you. I just tried your suggestion but it's still flickering.

EMG

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Flickering
Posted: Tue Jan 19, 2010 02:46 PM

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.

Regards



G. N. Rao.

Hyderabad, India
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Flickering
Posted: Tue Jan 19, 2010 07:19 PM
Enrico,

A solution could be to "paint" the groups instead of using real group controls:
Code (fw): Select all Collapse
#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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Flickering
Posted: Tue Jan 19, 2010 10:15 PM
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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Flickering
Posted: Tue Jan 19, 2010 10:34 PM

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.

Regards



G. N. Rao.

Hyderabad, India
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Flickering
Posted: Tue Jan 19, 2010 11:18 PM

It flickers in my sample for me.

EMG

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Flickering
Posted: Mon Nov 13, 2017 07:43 AM

Hello,
any news on this.

Thanks in advance
Otto

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Flickering
Posted: Mon Nov 13, 2017 09:31 AM

I can't reproduce the problem anymore. It seems it has been fixed somehow.

EMG

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Flickering
Posted: Mon Nov 13, 2017 09:32 AM

And I don't remember what I was need it for... :-(

EMG

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Flickering
Posted: Tue Nov 14, 2017 02:05 PM
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






Continue the discussion