FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Xbrowse moving to the next cell after edit (NO return-key) ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Xbrowse moving to the next cell after edit (NO return-key) ?
Posted: Tue Nov 10, 2015 03:52 PM
Hello,

A celledit in xbrowse works like EDIT -> RETURN -> NEXT CELL
Is it possible to auto-move to the next cell WITHOUT using the returnkey after edit ?
The fieldtype is < oCol:cEditPicture := "9" >



A day celledit looks like :

oCol := oBrw2:oCol( "T1" )
oCol:cHeader := "1" + CRLF + aDays[1]
oCol:nWidth := 22
oCol:nDataStrAlign := AL_CENTER
oCol:cEditPicture := "9"
oCol:nEditType := EDIT_GET
oCol:bOnPostEdit := { | oCol, xVal, nKey | ( NEU_TAGE(xVal, 1, "T1", cMonat, nPage ), ;
oBrw2:RefreshCurrent(), ;
oBrw2:SelectCol(6), lSpeichern := .F. ) }

------------

The function < NEU_TAGE(xVal, 1, "T1", cMonat, nPage ) >
saves the value and does some calculations

best regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: Xbrowse moving to the next cell after edit (NO return-key) ?
Posted: Tue Nov 10, 2015 06:46 PM
Uwe, Try this: (simulate a return key press)

Code (fw): Select all Collapse
 
//Jump to next column without pressing the enter key.
  oCol:bGetChange = {| k, f, o, oCol | If( Len( RTrim( o:oGet:Buffer ) ) == Len( o:oGet:Buffer ),;  
                                           ( o:SendMsg( WM_KEYDOWN, VK_RETURN ) ), ) }


Regards.
Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: Xbrowse moving to the next cell after edit (NO return-key) ?
Posted: Tue Nov 10, 2015 06:51 PM

The above code works fine if len of inserted value is equal to len of the field

Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Xbrowse moving to the next cell after edit (NO return-key) ?
Posted: Tue Nov 10, 2015 07:00 PM
Francisco,

thank You very much.
It works PERFECT and is exactly the solution I've been looking for.

My customer will be very happy because each customer table can have up to
20 performances x 30 days = 600 fields to be changed.
I added a solution with predefined day-values from monday to sunday
sample : adding 2 for monday, will fill all mondays of the month with 2



best regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: Xbrowse moving to the next cell after edit (NO return-key) ?
Posted: Tue Nov 10, 2015 07:06 PM

Uwe, I'm glad.
Regards.

Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Re: Xbrowse moving to the next cell after edit (NO return-key) ?
Posted: Wed Nov 11, 2015 03:55 AM

oCol:bGetChange = {| k, f, o, oCol | If( Len( RTrim( o:oGet:Buffer ) ) == Len( o:oGet:Buffer ),;
( o:SendMsg( WM_KEYDOWN, VK_RETURN ) ), ) }

ocol:ceditpicture:="9999.99", if I want input 12.16 ,after input 12. will end editing and jump to other cell .
Regrads !
Shuming wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Xbrowse moving to the next cell after edit (NO return-key) ?
Posted: Wed Nov 11, 2015 10:50 AM

Shuming wang,

Using decimals, maybe a change is needed.
For me the solution works perfect and saves a lot of input-time,
because the defined performances are integer-values and < 10
A average value is 3. That means a patient can get a performance
1 in the morning, 1 in the afternoon and 1 in the evening

best regards
Uwe :D

Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Xbrowse moving to the next cell after edit (NO return-key) ?
Posted: Wed Nov 11, 2015 04:34 PM
Uwe

You can use the TAB key just like Excel .. I use this option for my invoice detail entries ..

Rick Lipkin

Code (fw): Select all Collapse
WITH OBJECT oLbxB
         :lTabLikeExcel := .t.
END
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Xbrowse moving to the next cell after edit (NO return-key) ?
Posted: Wed Nov 11, 2015 06:05 PM
Rick,

yes it works like return.
The solution of < Francisco > is the fastest possible one I tested.
Just keep key 0 pressed and You can delete the complete table or row
without any extra keystroke.
Reaching the end of a row it starts the next row with the first defined numeric column.



best regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.

Continue the discussion