Xbrowse moving to the next cell after edit (NO return-key) ?

Xbrowse moving to the next cell after edit (NO return-key) ?

Postby ukoenig » Tue Nov 10, 2015 3: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" >

Image

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 :?:
Last edited by ukoenig on Tue Nov 10, 2015 7:22 pm, edited 2 times in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Xbrowse moving to the next cell after edit (NO return-key) ?

Postby FranciscoA » Tue Nov 10, 2015 6:46 pm

Uwe, Try this: (simulate a return key press)

Code: Select all  Expand view  RUN

//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
User avatar
FranciscoA
 
Posts: 2159
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Xbrowse moving to the next cell after edit (NO return-key) ?

Postby FranciscoA » Tue Nov 10, 2015 6: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
User avatar
FranciscoA
 
Posts: 2159
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Xbrowse moving to the next cell after edit (NO return-key) ?

Postby ukoenig » Tue Nov 10, 2015 7: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

Image

best regards
Uwe :D
Last edited by ukoenig on Tue Nov 10, 2015 7:23 pm, edited 2 times in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Xbrowse moving to the next cell after edit (NO return-key) ?

Postby FranciscoA » Tue Nov 10, 2015 7:06 pm

Uwe, I'm glad.
Regards.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2159
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Xbrowse moving to the next cell after edit (NO return-key) ?

Postby ShumingWang » Wed Nov 11, 2015 3: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
ShumingWang
 
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Re: Xbrowse moving to the next cell after edit (NO return-key) ?

Postby ukoenig » 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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Xbrowse moving to the next cell after edit (NO return-key) ?

Postby Rick Lipkin » Wed Nov 11, 2015 4:34 pm

Uwe

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

Rick Lipkin

Code: Select all  Expand view  RUN

WITH OBJECT oLbxB
         :lTabLikeExcel := .t.
END
 
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Xbrowse moving to the next cell after edit (NO return-key) ?

Postby ukoenig » Wed Nov 11, 2015 6: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.

Image

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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 71 guests