I have 3 problems with touch.prg sample.
Thanks in advance
Otto


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
//----------------------------------------------------------------------------//METHOD finger(x) CLASS TScrollPanel
::GoToPos( x )
return nil
//----------------------------------------------------------------------------//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), ) }Hello Antonio,
The only problem left is focus on SWITCH.
Best regards,
Otto
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() }
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 ![]()
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() }
Otto,
Please test this and let me know if it beeps:
oImgBack:bMLeave = { || MsgBeep() }
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
Dear Antonio,
can you please help me.
Thank you in advance
Otto
Otto,
Please try this:
oImgBack:bMLeave = { || x++ } // to generate a runtime error
lets see if the runtime error is generated
Dear Antonio,
no runtime error.
I use the original Fivewin touch.prg from the samples.
Thank you an best regards
Otto
Dear Otto,
This is working fine here:
oImgBack:bMLeave = { || MsgInfo( 1 ) }
so I guess it is related to remotely working
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