3 problems with touch.prg from the fwh/samples

User avatar
Otto
Posts: 6404
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 24 times
Been thanked: 2 times
Contact:

3 problems with touch.prg from the fwh/samples

Post by Otto »

Hello Antonio,
I have 3 problems with touch.prg sample.
Thanks in advance
Otto
Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
Posts: 6404
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 24 times
Been thanked: 2 times
Contact:

Re: 3 problems with touch.prg from the fwh/samples

Post by Otto »

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: Select all | Expand


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

//----------------------------------------------------------------------------//
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
Posts: 6404
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 24 times
Been thanked: 2 times
Contact:

Re: 3 problems with touch.prg from the fwh/samples

Post by Otto »

I found a workaround.
In TScrollPanel I inserted:

Code: Select all | Expand


METHOD finger(x) CLASS TScrollPanel
    ::GoToPos( x )
return nil
//----------------------------------------------------------------------------//
 


and when I define oPanel

Code: Select all | Expand


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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
Posts: 6404
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 24 times
Been thanked: 2 times
Contact:

Re: 3 problems with touch.prg from the fwh/samples

Post by Otto »

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

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 42529
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
Contact:

Re: 3 problems with touch.prg from the fwh/samples

Post by Antonio Linares »

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
User avatar
Antonio Linares
Site Admin
Posts: 42529
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
Contact:

Re: 3 problems with touch.prg from the fwh/samples

Post by Antonio Linares »

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
User avatar
Otto
Posts: 6404
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 24 times
Been thanked: 2 times
Contact:

Re: 3 problems with touch.prg from the fwh/samples

Post by Otto »

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() }
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 42529
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
Contact:

Re: 3 problems with touch.prg from the fwh/samples

Post by Antonio Linares »

Otto,

Please test this and let me know if it beeps:

oImgBack:bMLeave = { || MsgBeep() }
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 6404
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 24 times
Been thanked: 2 times
Contact:

Re: 3 problems with touch.prg from the fwh/samples

Post by Otto »

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
Posts: 6404
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 24 times
Been thanked: 2 times
Contact:

Re: 3 problems with touch.prg from the fwh/samples

Post by Otto »

Dear Antonio,
can you please help me.
Thank you in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 42529
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
Contact:

Re: 3 problems with touch.prg from the fwh/samples

Post by Antonio Linares »

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
User avatar
Otto
Posts: 6404
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 24 times
Been thanked: 2 times
Contact:

Re: 3 problems with touch.prg from the fwh/samples

Post by Otto »

Dear Antonio,
no runtime error.
I use the original Fivewin touch.prg from the samples.
Thank you an best regards
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 42529
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
Contact:

Re: 3 problems with touch.prg from the fwh/samples

Post by Antonio Linares »

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
User avatar
Otto
Posts: 6404
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 24 times
Been thanked: 2 times
Contact:

Re: 3 problems with touch.prg from the fwh/samples

Post by Otto »

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 42529
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 77 times
Contact:

Re: 3 problems with touch.prg from the fwh/samples

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply