FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour XBROWSE QUESTIONS ?
Posts: 301
Joined: Fri Jun 01, 2007 09:07 AM

XBROWSE QUESTIONS ?

Posted: Fri Sep 05, 2014 09:43 PM

Hi all

Xbrowse is going to be great class but coomplex too

Why not add in xbrowse.ch

ON PREEDIT
(ON POSTEDIT ... ON EDIT) exist
(WHEN ) exist
(VALID) exist
ON KEYDOWN
ON KEYCHAR

What is the order while evaluating ?
bOnPreEdit, bOnPostEdit, bWhen, bValid, bKEyDown, bKeyChar

What is the different between bKEyDown, bKeyChar
which one is evaluated first ?

Why bOnPreEdit dont support nKey parameter and is it possible do detect it ?
I need to know is ENTER pressed before editing.

What is the best way to detect really selected column ?

I use oBrw:nColSel + oBrw:nColOffset - 1
Hope it is ok

My problem.

I have xBrowse with 10 editable columns
Not all colums visible

First i want if try to edit selected column and really selected column
is higher that columns before that and some column before that column is empty
to show message something like MsgInfo("Enter value for column 2") and to go to column 2

IF it is ok
After that i want if i press ENTER key (13) value of that column to be
replaced with some value i have in array for that column.

After that i want to validate valye of that column (entered or replaced)

IF valid is ok go to next editable column ig no stay to that column
and return value it was before editing or replacing

Best regards,

Posts: 301
Joined: Fri Jun 01, 2007 09:07 AM

Re: XBROWSE QUESTIONS ?

Posted: Fri Sep 12, 2014 01:35 PM

Vacations still ? :)

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

Re: XBROWSE QUESTIONS ?

Posted: Fri Sep 12, 2014 05:35 PM

Hope this topic helps...

Rick Lipkin

viewtopic.php?f=3t=27191p=151099#p151099

&&

Posts: 301
Joined: Fri Jun 01, 2007 09:07 AM

Re: XBROWSE QUESTIONS ?

Posted: Sat Sep 13, 2014 10:10 PM

Rick,

Thanks for reply but that dont solve my problem ... :(

One of all unknown ... i really need to know nKey before editing column (bOnPreEdit) but there is no parameter nKEy
There is nothing about that in manual and only one line in xbrowse class

One of all cases i need i if client press ENTER key to replace value validate it and if it is ok to go to next editable column

I have try bKEyDown or bKeyChar ... but this is not going
IF( EMPTY( KON ), { || EVAL( __Keyboard(CHR(13)) ) } , )
I heve try
oCol:bOnPreEdit := { |KON| IIF(RECNO() = LASTREC() .AND. LASTREC() > 1 .AND. EMPTY(KON) .AND. GetKeyState(VK_RETURN), __keyboard(CHR(13)), ) }
not ok ..

Probably Mr.Rao is the only one who known everything but probably not online this days (vacation i guess) :)

Best regards,

Continue the discussion