FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse Cell Edit
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
xBrowse Cell Edit
Posted: Wed Apr 28, 2010 08:55 AM

Hi All,

If I edit xBrowse cell/column the edit value is highlighted or selected.. How to avoid this?

Regards,
Frances

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse Cell Edit
Posted: Wed Apr 28, 2010 10:01 AM

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?

Regards



G. N. Rao.

Hyderabad, India
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: xBrowse Cell Edit
Posted: Thu Apr 29, 2010 05:07 AM
nageswaragunupudi wrote:You need to modify xbrowse.prg.

In the METHOD Edit() CLASS TXBrwColumn, search for "::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 (fw): Select all Collapse
 oCol:bEditWhen := {|Self| IF( Self:oEditGet <> Nil, Self:oEditGet:SelectNone(), Nil), .T.}

would be handy so not to modify xbrowse.


best regards,
Frances
Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse Cell Edit
Posted: Thu Apr 29, 2010 01:27 PM

Mr Fraxzi

Personally I too prefer not to use :SelectAll().
Depending on what most users prefer, Mr Antonio may finally decide.

Regards



G. N. Rao.

Hyderabad, India
Posts: 392
Joined: Tue Mar 10, 2009 11:54 AM
Re: xBrowse Cell Edit
Posted: Thu Apr 29, 2010 02:41 PM

Hi to all,

the default in most windows software is SelectAll(), but with increasing size of the content to edit, a data loss becomes more and more dangerous.

So, it would really be better to have a more comfortable way to switch between SelectAll() and SelectNone, as Frances described above.

Windows 11 Pro 22H2 22621.1848

Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384

Harbour 3.2.0dev (r2008190002)

FWH 23.10 x86
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: xBrowse Cell Edit
Posted: Mon Aug 21, 2017 08:34 PM
Has anyone found a way to have memo edit default to selectnone() or unselect text during ON INIT?
I have tried many different ways to get the memo edit not to select all automatically.
This has caused more than 1 person to accidentally erase memo with keystroke.

Code (fw): Select all Collapse
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 )
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse Cell Edit
Posted: Tue Sep 05, 2017 02:00 PM
fraxzi wrote:
nageswaragunupudi wrote:You need to modify xbrowse.prg.

In the METHOD Edit() CLASS TXBrwColumn, search for "::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 (fw): Select all Collapse
 oCol:bEditWhen := {|Self| IF( Self:oEditGet <> Nil, Self:oEditGet:SelectNone(), Nil), .T.}

would be handy so not to modify xbrowse.


best regards,
Frances


Without modifying XBrowse, you can set
Code (fw): Select all Collapse
XbrGetSelectAll( .F. )
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse Cell Edit
Posted: Tue Sep 05, 2017 02:54 PM
Gale Ford

Please try this
Code (fw): Select all Collapse
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
Regards



G. N. Rao.

Hyderabad, India
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: xBrowse Cell Edit
Posted: Tue Sep 05, 2017 07:15 PM

I started another conversation and received similar solution.
Thanks for your follow up. Appreciated as always.

Continue the discussion