Hi All,
If I edit xBrowse cell/column the edit value is highlighted or selected.. How to avoid this?
Regards,
Frances
nageswaragunupudi wrote:You need to modify xbrowse.prg.
In the METHOD Edit() CLASS TXBrwColumn, search for "::oEditGet:SelectAll()" and comment out that line.
I wonder what many programmers would prefer. The present default behavior of xbrowse or the new behavior preferred by you?
oCol:bEditWhen := {|Self| IF( Self:oEditGet <> Nil, Self:oEditGet:SelectNone(), Nil), .T.}
local oDlg, oGet1, cText
cText := 'This is existing text'
DEFINE DIALOG oDlg RESOURCE "DLG_NOTE" TITLE 'Edit Note'
REDEFINE GET oGet1 VAR cText TEXT ID 100 OF oDlg UPDATE
ACTIVATE DIALOG oDlg CENTERED ON INIT oGet1:KeyDown( VK_END )
fraxzi wrote:nageswaragunupudi wrote:You need to modify xbrowse.prg.
In the METHOD Edit() CLASS TXBrwColumn, search for "::oEditGet:SelectAll()" and comment out that line.
I wonder what many programmers would prefer. The present default behavior of xbrowse or the new behavior preferred by you?
Dear RAO,
I think it would be better if there's a logical data whether to :selectall() or :selectnone()..
for example, my users edit a memo on xbrowse coloumn.. if by default is :selectall(), the entire content can be deleted if a char key was pressed.. so just by avoiding..
BTW, I commented what you suggests.
just maybe.. similar to this
- Code: Select all Expand view
oCol:bEditWhen := {|Self| IF( Self:oEditGet <> Nil, Self:oEditGet:SelectNone(), Nil), .T.}
would be handy so not to modify xbrowse.
best regards,
Frances
XbrGetSelectAll( .F. )
local oDlg, oGet1, cText
cText := 'This is existing text'
DEFINE DIALOG oDlg RESOURCE "DLG_NOTE" TITLE 'Edit Note'
REDEFINE GET oGet1 VAR cText TEXT ID 100 OF oDlg UPDATE
oGet1:bGotFocus := { || oGet1:SetSel( 0, 0 ) }
ACTIVATE DIALOG oDlg CENTERED
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 96 guests