Page 1 of 2

3 problems with touch.prg from the fwh/samples

PostPosted: Thu Feb 07, 2013 10:51 am
by Otto
Hello Antonio,
I have 3 problems with touch.prg sample.
Thanks in advance
Otto
Image

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

PostPosted: Sun Feb 10, 2013 11:29 am
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 view

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

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

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

PostPosted: Sun Feb 10, 2013 8:10 pm
by Otto
I found a workaround.
In TScrollPanel I inserted:

Code: Select all  Expand view

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


and when I define oPanel
Code: Select all  Expand view

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

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

PostPosted: Sun Feb 10, 2013 8:14 pm
by Otto
Hello Antonio,
The only problem left is focus on SWITCH.

Best regards,
Otto

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

PostPosted: Mon Feb 11, 2013 3:52 pm
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() }

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

PostPosted: Mon Feb 11, 2013 4:14 pm
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 :-)

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

PostPosted: Sun Oct 28, 2018 5:39 pm
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() }

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

PostPosted: Mon Oct 29, 2018 7:46 am
by Antonio Linares
Otto,

Please test this and let me know if it beeps:

oImgBack:bMLeave = { || MsgBeep() }

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

PostPosted: Mon Oct 29, 2018 8:15 am
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

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

PostPosted: Thu Nov 01, 2018 10:55 pm
by Otto
Dear Antonio,
can you please help me.
Thank you in advance
Otto

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

PostPosted: Sat Nov 03, 2018 12:36 pm
by Antonio Linares
Otto,

Please try this:

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

lets see if the runtime error is generated

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

PostPosted: Sat Nov 03, 2018 9:20 pm
by Otto
Dear Antonio,
no runtime error.
I use the original Fivewin touch.prg from the samples.
Thank you an best regards
Otto

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

PostPosted: Mon Nov 05, 2018 6:59 pm
by Antonio Linares
Dear Otto,

This is working fine here:

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

so I guess it is related to remotely working

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

PostPosted: Tue Nov 06, 2018 11:15 pm
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

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

PostPosted: Wed Nov 07, 2018 10:03 am
by Antonio Linares