3 problems with touch.prg from the fwh/samples

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

Postby Otto » Thu Nov 08, 2018 7:32 am

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

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

Postby Otto » Thu Nov 08, 2018 7:57 am

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

//----------------------------------------------------------------------------//
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6346
Joined: Fri Oct 07, 2005 7:07 pm

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

Postby Antonio Linares » Fri Nov 09, 2018 4:01 pm

Dear Otto,

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

thanks

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42126
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby Otto » Fri Nov 09, 2018 11:27 pm

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

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 69 guests