FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bug in SkinButtons()
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in SkinButtons()
Posted: Sat Oct 03, 2009 08:52 PM
This is the sample showing the problem. Pressing "Test" button the other one lost the skin effect:

Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBtn

    SKINBUTTONS()

    DEFINE DIALOG oDlg

    @ 2, 2 BUTTON "&Test";
           ACTION ( oBtn:Disable(), oBtn:Enable() )

    @ 3, 2 BUTTON oBtn PROMPT "&Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Bug in SkinButtons()
Posted: Sat Oct 03, 2009 09:05 PM
Enrico,

It seems as there is a painting state that we are not controlling yet.

As a workaround you can do:
Code (fw): Select all Collapse
    @ 2, 2 BUTTON "&Test";
           ACTION ( oBtn:Disable(), oBtn:Enable(), oDlg:Refresh() )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Bug in SkinButtons()
Posted: Sun Oct 04, 2009 08:27 AM

Antonio ,

there is another error

when I click on test button ( I click on many tries) the obtn is disable but then I CANNOT CLOSE THE DIALOG !!!!!

I try to click on "X" but it not run ok

the error not run when I click one on test button

to create the error you must click on test button many tries

then If you wait some seconds you can close the dialog

Best Regards, Saludos



Falconi Silvio
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Bug in SkinButtons()
Posted: Fri Dec 04, 2009 09:21 PM

Not yet :-(

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bug in SkinButtons()
Posted: Sat Dec 05, 2009 12:16 PM

No problem, my friend. It's only a pity that such a wonderful option can't be used yet.

EMG

Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Bug in SkinButtons()
Posted: Mon Dec 07, 2009 10:20 AM

Just a question:
from the practical point of view which is the way to enable and disable the button?

@ 2, 2 BUTTON "&Test";
ACTION ( oBtn:Disable(), oBtn:Enable() )

...excuse me dear friends but I do not understand the problem.

Marco Boschi
info@marcoboschi.it
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Bug in SkinButtons()
Posted: Mon Dec 07, 2009 10:30 AM

Marco,

To disable a button, or any window, dialog or control, we use oControl:Disable() only.

In this case Enrico found that when calling to both oBtn:Disable(), oBtn:Enable() then the used skin is not applied.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Bug in SkinButtons()
Posted: Mon Dec 07, 2009 10:39 AM

Antonio,
is this the case:

1) disable button
2) call to several functions
3) enable button again

Is that correct? is this the case?
Bye

Marco Boschi
info@marcoboschi.it
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Bug in SkinButtons()
Posted: Mon Dec 07, 2009 10:46 AM

Marco,

Yes, that should work fine.

The problem is only when doing the two consecutive calls

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bug in SkinButtons()
Posted: Mon Dec 07, 2009 01:12 PM
No, the problem is when any function is called in between too:

Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBtn

    SKINBUTTONS()

    DEFINE DIALOG oDlg

    @ 2, 2 BUTTON "&Test";
           ACTION ( oBtn:Disable(), TEST(), oBtn:Enable() )

    @ 3, 2 BUTTON oBtn PROMPT "&Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


STATIC FUNCTION TEST()

    LOCAL oDlg

    DEFINE DIALOG oDlg

    @ 1, 2 BUTTON "&Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Bug in SkinButtons()
Posted: Mon Dec 07, 2009 03:12 PM
Enrico,

This reduced version from yours also fails in Windows 7:
Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBtn

    SKINBUTTONS()

    DEFINE DIALOG oDlg

    @ 2, 2 BUTTON "&Test";
           ACTION ( oBtn:Disable(), oBtn:Enable() )

    @ 3, 2 BUTTON oBtn PROMPT "&Close";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

RETURN NIL
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Bug in SkinButtons()
Posted: Fri Apr 16, 2010 07:32 AM

Is this bug present in 10.3 or has it been resolved?

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Bug in SkinButtons()
Posted: Fri Apr 16, 2010 07:45 AM

Unfortunately, It is still present. :-(

EMG

Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Bug in SkinButtons()
Posted: Fri Apr 16, 2010 07:54 AM

Thank you for the info Enrico

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion