FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour 3 problems with touch.prg from the fwh/samples
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
3 problems with touch.prg from the fwh/samples
Posted: Thu Feb 07, 2013 10:51 AM
Hello Antonio,
I have 3 problems with touch.prg sample.
Thanks in advance
Otto
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Sun Feb 10, 2013 11:29 AM
Hello Antonio,

hover effert

I found a workaround for hover effert with inserting DrawEllipse method from an other class to TRBtn.

--------------------

I can't find out how to make operable scrollpanel with finger.


Hope you can help me.
Thanks in advance
Otto

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

Code (fw): Select all Collapse
METHOD DrawEllipse( hDC, nRGBColor, n ) CLASS TRBtn

   local hOldBrush := SelectObject( hDC, GetStockObject( NULL_BRUSH ) )
   local hPen := CreatePen( hDC, 1, nRGBColor )

   DEFAULT n := -1

  Ellipse( hDC, n, n, ::nWidth - 1 , ::nHeight - 1 , hPen )

   SelectObject( ::hDC, hOldBrush )
   DeleteObject( hPen )

return nil

//----------------------------------------------------------------------------//
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Sun Feb 10, 2013 08:10 PM
I found a workaround.
In TScrollPanel I inserted:

Code (fw): Select all Collapse
METHOD finger(x) CLASS TScrollPanel
    ::GoToPos( x )
return nil
//----------------------------------------------------------------------------//


and when I define oPanel
Code (fw): Select all Collapse
oPanel:bLClicked    := { || oPanel:SetFocus(),lSlider := .t. }
oPanel:bLButtonUp     := { |r,c,f,lDrag | lSlider := .f. }
oPanel:bMMoved  := { |r,c,f,lDrag| if( lSlider = .t. , oPanel:finger(r), ) }

Best regards,
Otto
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Sun Feb 10, 2013 08:14 PM

Hello Antonio,
The only problem left is focus on SWITCH.

Best regards,
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Mon Feb 11, 2013 03:52 PM

Otto,

The back arrow that we show there is a TImage object. As TImage inherits from TBitmap, then we could do:

oImgBack:bMove = { || If( oImgBack;cBmpFile != "..\bitmaps\metro\back-black-48-hover.png", ( oImgBack:LoadImage( nil, "..\bitmaps\metro\back-black-48-hover.png" ), oImgBack:Refresh() ), nil ) }
oImgBack:bMLeave = { || oImgBack:LoadImage( nil, "..\bitmaps\metro\back-black-48.png" ), oImgBack:Refresh() }

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Mon Feb 11, 2013 04:14 PM

Otto,

I just tested samples/touch.prg and the switches seem to get the focus though they don't change their appareance.

Please give the focus to the GET above the switch and press tab. If you press tabs two times more, then the GET below gets the focus. So the focus sequence is working fine :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Sun Oct 28, 2018 05:39 PM

Dear Antonio
can you please help me with
oImgBack:bMLeave = { || oImgBack:LoadImage( nil, "..\bitmaps\metro\back-black-48.png" ), oImgBack:Refresh(), msginfo(1) }.

I tried your suggestions but oImgBack:bMLeave here is not working.

Thank you in Advance

Otto

@ 20, 20 IMAGE oImgBack FILENAME "..\bitmaps\metro\back-black-48.png" OF oDlg ;
PIXEL NOBORDER

oImgBack:bMMoved = { || If( oImgBack:cBmpFile != "..\bitmaps\metro\Metro-Back-48hover.bmp",;
( oImgBack:LoadImage( nil, "..\bitmaps\metro\Metro-Back-48hover.bmp" ), oImgBack:Refresh() ), nil ) }


oImgBack:bMLeave = { ||  oImgBack:LoadImage( nil, "..\bitmaps\metro\back-black-48.png" ), oImgBack:Refresh(), msginfo(1) }

oImgBack:bLButtonUp := { || oDlg:End() }

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Mon Oct 29, 2018 07:46 AM

Otto,

Please test this and let me know if it beeps:

oImgBack:bMLeave = { || MsgBeep() }

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Mon Oct 29, 2018 08:15 AM

Dear Antonio,

I changed bMove to bMMoved as bMove errors out.
I can’t test with msgbeep as I work remote.
Therefor I use:

oImgBack:bMLeave = { ||  msginfo(1) }

I do not see the msg.
I use the original touch.prg of FiveTech.
Thank you and best regards
Otto

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Thu Nov 01, 2018 10:55 PM

Dear Antonio,
can you please help me.
Thank you in advance
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Sat Nov 03, 2018 12:36 PM

Otto,

Please try this:

oImgBack:bMLeave = { || x++ } // to generate a runtime error

lets see if the runtime error is generated

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Sat Nov 03, 2018 09:20 PM

Dear Antonio,
no runtime error.
I use the original Fivewin touch.prg from the samples.
Thank you an best regards
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Mon Nov 05, 2018 06:59 PM

Dear Otto,

This is working fine here:

oImgBack:bMLeave = { || MsgInfo( 1 ) }

so I guess it is related to remotely working

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Tue Nov 06, 2018 11:15 PM

Dear Antonio,
thank you.
Can you please send me your prg and exe file.
I will test remote and on my local system.
Maybe I do not have all the latest classes
Best regards
Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: 3 problems with touch.prg from the fwh/samples
Posted: Wed Nov 07, 2018 10:03 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com