xBrowse - lFastEdit (not respected by browse)

xBrowse - lFastEdit (not respected by browse)

Postby nageswaragunupudi » Sat Nov 24, 2007 3:30 am

Any key press should trigger edit of a cell only when oBrw:lFastEdit is set to .T.. When lFastEdit is set to false, only pressing Enter key or Double Click should invoke the edit.

Presently xBrowse ignores lFastEdit data and triggers edit on any keypress.
Also only alphanumeric keys only trigger edit. For numeric columns '-' (minus) also should trigger edit.

Suggested modification is to change the following line in Otherwise clause in KeyPress method:
Code: Select all  Expand view
OldCode:
         If ::nMarqueeStyle <= MARQSTYLE_HIGHLCELL .and. oCol:nEditType > 0 .and. ;
            ( IsAlpha( cKey ) .or. IsDigit( cKey ) )
            oCol:Edit( nKey )

NewCode:

         If ::lFastEdit .and. ::nMarqueeStyle <= MARQSTYLE_HIGHLCELL .and. oCol:nEditType > 0 .and. ;
            ( IsAlpha( cKey ) .or. IsDigit( cKey ) .or. cKey == '-' )
            oCol:Edit( nKey )

It would be even nicer if the trigger keys are decided on the basis of the valtype of the editvalue. Code would be longer but it is worth.

In addition to Enter and DoubleClick, F2 also may be added to the trigger keys to make xBrowse behave like Excel, which many users are accustomed to.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10622
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby Antonio Linares » Sat Nov 24, 2007 11:01 am

> ::lFastEdit ... cKey == '-'

Added. Thanks! :-)
regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 54 guests