I made this button on Ribbonbar because radio control is not transparent)
@ 24, 400 ADD BUTTON oSay OF ::oGrPlanning BITMAP ".\bitmaps\bradio1.bmp" MOSTLEFT SIZE 65, 18 PROMPT "Filtro" ;
ACTION ( oSelf:lFilter := ! oSelf:lFilter, ;
oSay:SetFile( If( oSelf:lFilter, ".\bitmaps\bradio1.bmp", ".\bitmaps\bradio2.bmp" ) ) )
then I have a get
@ 9,592 GET oNum1 VAR oSelf:nNumFrom SIZE 90,60 PIXEL OF ::oGrPlanning ;
FONT oFontBig ;
BITMAP FwDArrow() ;
ACTION NIL ;
WHEN oSelf:lFilter
when the oSelf_lFiler is F the get is allwasy active
how I can resolve ?
Clausole When not run ok - Resolved!!!
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Clausole When not run ok - Resolved!!!
Last edited by Silvio.Falconi on Fri Jul 05, 2019 5:42 pm, edited 1 time in total.
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Re: Clausole When not run ok
lFilter is STATIC VARIABLE? .T. or .F.?
To best assist you, always set a full example. You always put pieces of the program.
Regards.
To best assist you, always set a full example. You always put pieces of the program.
Regards.
João Santos - São Paulo - Brasil
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Clausole When not run ok
lfilter is a DATA of my class and init is false
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Re: Clausole When not run ok
And when you change lfilter to .T., What returns?
? lFilter
Regards.
Code: Select all
Return( ::lFilter ) // ??
? lFilter
Regards.
João Santos - São Paulo - Brasil
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Clausole When not run ok
return right only the get not respect the when clausole
I tried with btnbmp
@ 24, 400 BTNBMP oSay PROMPT { || If( oSelf:lFilter, "Filtro", "Tutti" ) } ;
RESOURCE aImagesGiorno[ 1 ] ;
SIZE 50,60 PIXEL OF ::oGrPlanning FLAT ;
ACTION ( oSelf:lFilter := !oSelf:lFilter, ;
::SetImages( If(oSelf:lFilter, aImagesGiorno[ 1 ], aImagesGiorno[ 2 ] ) ),;
msginfo(oSelf:lFilter) )
@ 9,592 GET oNum1 VAR oSelf:nNumFrom SIZE 110,40 PIXEL OF ::oGrPlanning ;
FONT oFontBig ;
BITMAP FwDArrow() ;
ACTION nil,;
oNum1:REFRESH() ) when ::lFilter //or when oself:lfilter
the btnbmp run ok and change the value od lFilter
then the get not respect the clausole WHEN oself:lfilter or when ::lFilter
because the get must run only when lfilter is true
I tried also with @ 24, 400 BTNBMP oSay PROMPT { || If( oSelf:lFilter, "Filtro", "Tutti" ) } ;
RESOURCE aImagesGiorno[ 1 ] ;
SIZE 50,60 PIXEL OF ::oGrPlanning FLAT ;
ACTION ( oSelf:lFilter := !oSelf:lFilter, ;
::SetImages( If(oSelf:lFilter, aImagesGiorno[ 1 ], aImagesGiorno[ 2 ] ) ),;
oNum1:refresh(),oNum2:refresh() )
but oNum1 and oNum2 are not disable when the lFilter is False
I tried with btnbmp
@ 24, 400 BTNBMP oSay PROMPT { || If( oSelf:lFilter, "Filtro", "Tutti" ) } ;
RESOURCE aImagesGiorno[ 1 ] ;
SIZE 50,60 PIXEL OF ::oGrPlanning FLAT ;
ACTION ( oSelf:lFilter := !oSelf:lFilter, ;
::SetImages( If(oSelf:lFilter, aImagesGiorno[ 1 ], aImagesGiorno[ 2 ] ) ),;
msginfo(oSelf:lFilter) )
@ 9,592 GET oNum1 VAR oSelf:nNumFrom SIZE 110,40 PIXEL OF ::oGrPlanning ;
FONT oFontBig ;
BITMAP FwDArrow() ;
ACTION nil,;
oNum1:REFRESH() ) when ::lFilter //or when oself:lfilter
the btnbmp run ok and change the value od lFilter
then the get not respect the clausole WHEN oself:lfilter or when ::lFilter
because the get must run only when lfilter is true
I tried also with @ 24, 400 BTNBMP oSay PROMPT { || If( oSelf:lFilter, "Filtro", "Tutti" ) } ;
RESOURCE aImagesGiorno[ 1 ] ;
SIZE 50,60 PIXEL OF ::oGrPlanning FLAT ;
ACTION ( oSelf:lFilter := !oSelf:lFilter, ;
::SetImages( If(oSelf:lFilter, aImagesGiorno[ 1 ], aImagesGiorno[ 2 ] ) ),;
oNum1:refresh(),oNum2:refresh() )
but oNum1 and oNum2 are not disable when the lFilter is False
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Clausole When not run ok
Already in the afternoon I had solved when Enrico reminded me that I had to use AEvalWhen (), anyway thanks anyway. ia another time I had the same problem but unfortunately a little for the age a little for the heat I have not recirculated myself
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC