Page 2 of 2

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

PostPosted: Thu Nov 08, 2018 7:32 am
by Otto
Dear Antonio,
is this the right place where I should test.
If yes then it is not working. I tested remote and locally.

Do you thinkthere will be a solution?
Thank you in advance
Otto
Image

Image

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

PostPosted: Thu Nov 08, 2018 7:57 am
by Otto
Dear Antonio
I use TRBtn as I never got TImage working.
In my copy of TRBtn I inserted DrawEllipse method and changed Paint method.
This is working for me. But now I want to switch to the newest FIVEWIN version and original FW classes evolved much.
It is difficult for me to keep up my changes.

Best regards
Otto


method paint
...

if ::lMOver .and. nTypeButton != 3

do case
case nTypeButton == TYPE_NORMAL

if ::lSelected
GradientFill( ::hDC, 1, 1, ::nHeight, ::nWidth - If(::lRound,2,0), eval( ::bClrGradSelectPress, ::lPressed ) )
else
//procl
if ::lRound = .t.
GradientFill( ::hDC, 1, 1, ::nHeight, ::nWidth - If(::lRound,2,0), eval( ::bClrGradNormal, ::lPressed ) )
else

::DrawEllipse( ::hDC, CLR_BLUE, 1 )
endif
endif

case nTypeButton == TYPE_POPUP
GradientFill( ::hDC, 1,1, ::nHeight, ::nWidth - 2, ::aClrGradBack )


...


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

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: Fri Nov 09, 2018 4:01 pm
by Antonio Linares
Dear Otto,

Please go to "Company", then click on "+" and then test it

thanks

Image

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

PostPosted: Fri Nov 09, 2018 11:27 pm
by Otto
Dear Antonio,
you sample works but you have no hover bitmap.
Also you have to move the mouse more than 2 cm away till MsgInfo is executed.

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

then oImgBack:bMLeave = { || MsgInfo( 1 ) in no more working.

Thank you in advance
Otto