xBrowse Cell Edit

xBrowse Cell Edit

Postby fraxzi » Wed Apr 28, 2010 8: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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: xBrowse Cell Edit

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Cell Edit

Postby fraxzi » Thu Apr 29, 2010 5:07 am

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  RUN
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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: xBrowse Cell Edit

Postby nageswaragunupudi » Thu Apr 29, 2010 1: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
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Cell Edit

Postby frose » Thu Apr 29, 2010 2: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
User avatar
frose
 
Posts: 392
Joined: Tue Mar 10, 2009 11:54 am
Location: Germany, Rietberg

Re: xBrowse Cell Edit

Postby Gale FORd » Mon Aug 21, 2017 8: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: Select all  Expand view  RUN

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 )
 
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: xBrowse Cell Edit

Postby nageswaragunupudi » Tue Sep 05, 2017 2:00 pm

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  RUN
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: Select all  Expand view  RUN

XbrGetSelectAll( .F. )
 
Regards

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

Re: xBrowse Cell Edit

Postby nageswaragunupudi » Tue Sep 05, 2017 2:54 pm

Gale Ford

Please try this
Code: Select all  Expand view  RUN
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
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Cell Edit

Postby Gale FORd » Tue Sep 05, 2017 7:15 pm

I started another conversation and received similar solution.
Thanks for your follow up. Appreciated as always.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 70 guests