Hi,
I succesfully work with TSBrowse 7.0,
my only problem is when I write a new value in a cell
because that value will not be assigned if the user change the focus to
another control (for example press an "Exit" button after wrote the new
value
in the cell).
The new value is assigned only if I go to another cell after inserted the
new value.
Is there any way to assign the new value to the cell when the browse lost
the focus ?
See this sample code:
#include "FiveWin.ch"
#include "TSBrowse.ch"
//----------------------------------------------------------------------------//
static oDlg
function Main()
local aArray,oBrw
aArray:=array(0,2)
aadd(aArray,{"Marko",4})
aadd(aArray,{"Robert",5})
aadd(aArray,{"Mary",6})
DEFINE DIALOG oDlg FROM 2,2 TO 24, 75 TITLE "Test "
@ 1.5, 1 TSBROWSE oBrw CELLED OF oDlg ;
oBrw:SetArray(aArray)
TSADD COLUMN TO oBrw DATA ARRAY ELEMENT 1;
HEADER "Name";
3DLOOK FALSE, TRUE, TRUE ;
ALIGN DT_RIGHT, DT_LEFT, DT_RIGHT;
EDITABLE MOVE DT_MOVE_RIGHT;
SIZE 100
TSADD COLUMN TO oBrw DATA ARRAY ELEMENT 2;
HEADER "Age";
3DLOOK FALSE, TRUE, TRUE ;
ALIGN DT_RIGHT, DT_LEFT, DT_RIGHT;
EDITABLE MOVE DT_MOVE_RIGHT;
PICTURE "@k 999";
SIZE 100
@ 0.2, 1 BUTTON "E&xit" OF oDlg SIZE 30,12;
ACTION (MsgInfo("Marko's age is "+str(aArray[1,2])),oDlg:End())
@0.2,10 SAY "Write 15 into the Marko's age cell and then press Exit, as
you can see the new value is not token."+CHR(13)+CHR(10)+"I want that the
new value will be assigned with the lostfocus too !" OF ODLG
ACTIVATE DIALOG oDlg
return nil
Thanks in advance
Best Regards,
--
Marco Turco
SOFTWARE XP LLP, London
www.softwarexp.co.uk