tcbrowse editcol method

Post Reply
User avatar
don lowenstein
Posts: 196
Joined: Mon Oct 17, 2005 9:09 pm
Contact:

tcbrowse editcol method

Post by don lowenstein »

When a key is pressed on a browse object, I capture that key's nvalue in the keydown() method, and, based on that value, call obrw:leditcol() method and edit the value in a tget object. no problem. this is very routine processing.

My problem is, applying that key's value to the contents of the beginning of the edit field.
I can use the OVERSTRIKE method of the oget:oget object to "preserve" the key pressed and apply it to the current contents of the oget:oget (which is really a Harbour get object attached to Fivewin TGet object.)
but the value in the Harbour get does not get assigned back to the parent tget object.

if the field is a Character datatype, I found that I can modify the "uVar" value passed to obrw:leditcol() and I get desired result, but I think there should be a better way to modify the actual oGet:oGet data entry object.

example:
A cell's old value was "ABC"
I type "X" on the browse object's cell.
I would like the edit process to begin in the 2nd position and a value of "XBC"


example:
A cell's old date value was "01/15/2013"
I type "1" on the browse object's cell.
I try to overstike the oGet:oGet:Overstrike( "11/15/2013" ) - this works,
I would like the edit process to begin in the 2nd position with a value of "11/31/2013"

A cell's old date value was " / / " - empty
I type "1" on the browse object's cell.
I try to overstike the oGet:oGet:Overstrike( "1 / / " ) - this works,
I would like the edit process to begin in the 2nd position with a value of "1 / / "

My question is, how can I preserve this initial keypressed value and "apply" that value to the editing buffer and begin the tget edit with the newly entered key-value?
Don Lowenstein
www.laapc.com
Post Reply