3 problems with touch.prg from the fwh/samples

3 problems with touch.prg from the fwh/samples

Postby Otto » Thu Feb 07, 2013 10:51 am

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: 6005
Joined: Fri Oct 07, 2005 7:07 pm

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

Postby Otto » 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: 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

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

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

Postby Otto » Sun Feb 10, 2013 8:10 pm

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

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

Postby Otto » Sun Feb 10, 2013 8:14 pm

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
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

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

Postby Antonio Linares » Mon Feb 11, 2013 3: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby Antonio Linares » Mon Feb 11, 2013 4: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby Otto » Sun Oct 28, 2018 5: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() }
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

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

Postby Antonio Linares » Mon Oct 29, 2018 7:46 am

Otto,

Please test this and let me know if it beeps:

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

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

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

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

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

Postby Otto » Thu Nov 01, 2018 10:55 pm

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
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

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

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby Otto » Sat Nov 03, 2018 9:20 pm

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
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

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

Postby Antonio Linares » Mon Nov 05, 2018 6: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

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

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

Postby Antonio Linares » Wed Nov 07, 2018 10:03 am

regards, saludos

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

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 103 guests