Page 1 of 1

Undo FW 2.3

Posted: Wed Jan 25, 2006 9:55 pm
by AndyRoss
There was a change to the Tget class sometime in 2002 where the popup menu code initiated by a right click was bypassed in favor of Windows default popup menu. For some reason, I cannot get the Undo option to be enabled when there is a change to the get value. Does anyone remember this issue and more importantly, how to fix it.

Thanks

Posted: Wed Jan 25, 2006 10:58 pm
by Antonio Linares
Andy,

Please use the popup to paste some text in the GET and then open it again and check if the undo item is enabled.

Posted: Thu Jan 26, 2006 6:14 pm
by AndyRoss
I did and there is no change -- Undo is still disabled. FYI, this is 16-Bit FW.

Here is the code:

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

METHOD RButtonDown( nRow, nCol, nFlags ) CLASS TGet

if GetFocus() != ::hWnd
::SetFocus()
SysRefresh() // In case there is a VALID somewhere
if GetFocus() != ::hWnd
return nil
endif
endif

if ::bRClicked != nil
return Eval( ::bRClicked, nRow, nCol, nFlags )
endif

return nil // Invokes default popup menu

Posted: Fri Jan 27, 2006 10:22 am
by Antonio Linares
Andy,

Change the method this way:

METHOD RButtonDown() VIRTUAL

at the CLASS ... ENDCLASS section and comment out the below method code and try it again.

Posted: Fri Jan 27, 2006 10:18 pm
by AndyRoss
Antonio,

It still doesn't work. However, I did test it with 32-Bit FW and it does work. I am wondering if it's a WinAPI thing. Can you test it in 16-Bit with TestGet2.prg and let me know. Thanks.

Posted: Fri Jan 27, 2006 11:20 pm
by Antonio Linares
Andy,

We have tested samples\TestGet2.prg using FW 2.7 for Clipper, and it works ok. If we paste something then the undo item is available. See the picture (in spanish):

Image