fading....(hide..show)

fading....(hide..show)

Postby Silvio.Falconi » Fri Aug 23, 2019 6:57 pm

can we show a get/say fading control?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: fading....(hide..show)

Postby ukoenig » Sat Aug 24, 2019 7:42 am

Sylvio,

You will get a solution in a short time.
It will work on other objects as well.
A different fading-speed can be defined.
Looks great and works perfect.

from button-action
( object, style, speed )

@ 30, 50 SAY oSay PROMPT "Testing Fade IN / OUT" OF oDlg SIZE 150, 25 PIXEL FONT oFont

The original size-values are needed to fade in again

@ 170, 20 BUTTONBMP oBtnOut ;
PROMPT "Fade IN" SIZE 80, 25 PIXEL OF oDlg ;
ACTION ( FADE_INOUT( oSay, 25, 150, .F., 0.1 ) ) // In

@ 170, 120 BUTTONBMP oBtnOut ;
PROMPT "Fade OUT" SIZE 80, 25 PIXEL OF oDlg ;
ACTION ( FADE_INOUT( oSay, 25, 150, .T., 0.1 ) ) // Out


regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: fading....(hide..show)

Postby Silvio.Falconi » Sat Aug 24, 2019 9:03 am

where is the function FADE_INOUT ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: fading....(hide..show)

Postby ukoenig » Sat Aug 24, 2019 9:18 am

Silvio,

I'm still working on / testing.
As soon it is finished I will add a sample

regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: fading....(hide..show)

Postby Silvio.Falconi » Sat Aug 24, 2019 9:22 am

I trying with oWnd and odlg but when I wish fade a control object it not run ok
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: fading....(hide..show)

Postby ukoenig » Sat Aug 24, 2019 11:41 am

Silvio,

a complete test : say, get and button - fade

Image

Code: Select all  Expand view  RUN

#include "fivewin.ch"

FUNCTION MAIN()
LOCAL oDlg, oSay, oGet, cGet := "Testing Fade IN / OUT", oBtn[7]
 
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14

DEFINE DIALOG oDlg  SIZE 300, 250 PIXEL TRUEPIXEL FONT oFont ;
TITLE "Fade IN / OUT" ;
COLOR CLR_BLACK,CLR_WHITE

@ 30, 50 SAY oSay PROMPT "Testing Fade IN / OUT" OF oDlg SIZE 150, 25 PIXEL  FONT oFont
@ 80, 50 GET oGet VAR  cGet   OF oDlg SIZE 150, 25 PIXEL  

@ 130, 20 BUTTONBMP oBtn[1]  ;
PROMPT "Say OUT"  SIZE 80, 25 PIXEL OF oDlg ;
ACTION ( FADE_INOUT( oSay, 30, 50, 150, 25, .F., 0.12 ) ) // In

@ 130, 120 BUTTONBMP oBtn[2]  ;
PROMPT "Say IN"  SIZE 80, 25 PIXEL OF oDlg ;
ACTION ( FADE_INOUT( oSay, 30, 50, 150, 25, .T., 0.12 ) ) // Out

@ 170, 20 BUTTONBMP oBtn[3]  ;
PROMPT "Get OUT"  SIZE 80, 25 PIXEL OF oDlg ;
ACTION ( FADE_INOUT( oGet, 80, 50, 150, 25, .F., 0.12 ) ) // In

@ 170, 120 BUTTONBMP oBtn[4]  ;
PROMPT "Get IN"  SIZE 80, 25 PIXEL OF oDlg ;
ACTION ( FADE_INOUT( oGet, 80, 50, 150, 25, .T., 0.12 ) ) // Out

@ 210, 20 BUTTONBMP oBtn[5]  ;
PROMPT "Btn OUT"  SIZE 80, 25 PIXEL OF oDlg ;
ACTION ( FADE_INOUT( oBtn[7], 170, 220, 50, 25, .F., 0.12 ) ) // In

@ 210, 120 BUTTONBMP oBtn[6]  ;
PROMPT "Btn IN"  SIZE 80, 25 PIXEL OF oDlg ;
ACTION ( FADE_INOUT( oBtn[7], 170, 220, 50, 25, .T., 0.12 ) ) // Out

@ 170, 220 BUTTONBMP oBtn[7]  ;
PROMPT "Exit"  SIZE 50, 25 PIXEL OF oDlg ;
ACTION oDlg:End()

ACTIVATE DIALOG  oDlg CENTERED

RELEASE FONT oFont

RETURN NIL

// -----------------

STATIC FUNCTION FADE_INOUT( oObject, nTop, nLeft, nWidth, nHeight, lType, nSpeed )
LOCAL nHStep, nWStep

nHStep := nHeight / 5
nWStep := nWidth / 5

IF  lType = .F. // Fade IN
    FOR I := 1 TO 10
        oObject:nTop        := nTop+= ( nHStep / 2 )
        oObject:nLeft       := nLeft+= ( nWStep / 2 )
        oObject:nHeight := nHeight-= nHStep
        oObject:nWidth  := nWidth-= nWStep
        oObject:Refresh()
        SYSWAIT(nSpeed)
    NEXT
ELSE
        // zero position top left
    nTop := nTop + ( nHeight / 2 )
        nLeft := nLeft + ( nWidth / 2 )
    nHeight := 0
    nWidth := 0
    FOR I := 1 TO 10
        oObject:nTop        := nTop-= nHStep / 4
        oObject:nLeft       := nLeft-= nWStep / 4
        oObject:nHeight := nHeight+= ( nHStep / 2 )
        oObject:nWidth  := nWidth+= ( nWStep / 2 )
        oObject:Refresh()
        SYSWAIT(nSpeed)
    NEXT
ENDIF

RETURN NIL
 


regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: fading....(hide..show)

Postby Silvio.Falconi » Sat Aug 24, 2019 2:30 pm

GOOD
but I'm thinking as SetLayeredWindowAttributes
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 88 guests