TSBrowse Which event to be used when user navigate row/col

TSBrowse Which event to be used when user navigate row/col

Postby anserkk » Wed Jun 18, 2008 10:56 am

Dear freinds,

Whenever a user moves from one column to another column
OR
Whenever a user moves from one row to another row

I need to fire an event,

I should be able to understand the new Row, the new Col and should be
able to execute a function. I don't understand which event to be used.

I tried TsBrowse's bChange but unfortunately TBrowse:bChange will
fire only when the user moves from the current row to a new row, it
doesn't fire when the the user moves to another column of the same row.

I am using oBrw:nRowPos and oBrw:nCell to identify the Row number and column number. I don't knw why oBrw:nCol returning a wrong value

If anybody know any solution, please let me know.

Regards
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: TSBrowse Which event to be used when user navigate row/

Postby mmercado » Wed Jun 18, 2008 5:22 pm

anserkk wrote:Whenever a user moves from one column to another column OR Whenever a user moves from one row to another row I need to fire an event,

Hi:

Every time the user moves the cursor from one column to another, TSBrowse evaluates the codeblocks oBrw:aColumns[ nCol ]:bGotFocus and oBrw:aColumns[ nCol ]:bLostFocus. These codeblocks receive the present (oBrw:nCell) and previous (oBrw:nOldCell) column numbers as parameters

Regards.

Manuel Mercado
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Re: TSBrowse Which event to be used when user navigate row/

Postby anserkk » Thu Jun 19, 2008 5:26 am

Thank you very much,

I really like your TSBrowse control.

I have few more doubts

1. Is it possible to define a TsBrowse without an Alias clause and later assign Alias clause at run time, depending on the dbf

2. Is it possible to define a TsBrowse and make it totally hidden and show only when it is required.

If possible can I have the syntax for the above.

If the above 2 things are possible then I will be able to solve many complications in my coding.

My suggestions & Feedbacks regarding TsBrowse Ver 7.
---------------------------------------------------------------

While appending a new record, once the user exit the first editable column, the new record is appended, but at certain times user may require more validations on other column of the same row to become a valid record/row. Record should be appended only after all the validations are .T., something like a RowValidation. (lAppendmode changes from .T. to .F. once the user exit the first editable column of a new record) Is it possible to include such things in your next version.

I mostly use temporary dbf on TsBrowse. For eg, A temp dbf is created and data from the Original DBF is read and appended to the temporary dbf. TsBrowse uses the Temp dbf for display. While editing using TsBrowse, I update the original DBF and the temporary dbf (Temp dbf is updated by TsBrowse itself)

In clipper 5.01 I used a customised ver of DbEditBrowse, In that I had total control over the DBF, ie I append/replaced the record/field onto the DBf when all the columns are valid.

I also found a bug in TsBrowse:Proper(). Proper() will work only if the name of the Browse object is declared as private. I don't know whether this is a bug or my mistake.

Regards

Anser

mmercado wrote:
anserkk wrote:Whenever a user moves from one column to another column OR Whenever a user moves from one row to another row I need to fire an event,

Hi:

Every time the user moves the cursor from one column to another, TSBrowse evaluates the codeblocks oBrw:aColumns[ nCol ]:bGotFocus and oBrw:aColumns[ nCol ]:bLostFocus. These codeblocks receive the present (oBrw:nCell) and previous (oBrw:nOldCell) column numbers as parameters

Regards.

Manuel Mercado
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: TSBrowse Which event to be used when user navigate row/

Postby mmercado » Thu Jun 19, 2008 3:25 pm

Hello Anser:
anserkk wrote:1. Is it possible to define a TsBrowse without an Alias clause and later assign Alias clause at run time, depending on the dbf
If no alias is given when browse is created, TSBrowse asumes the active database with it's alias, nevertheless you can create the browse with an alias and change oBrw:cAlias at runtime (assuming similar data structure).

anserkk wrote:2. Is it possible to define a TsBrowse and make it totally hidden and show only when it is required.
As in every control derived from TControl Class, you can oBrw:Hide() and oBrw:Show() whenever you want

anserkk wrote:I mostly use temporary dbf on TsBrowse. For eg, A temp dbf is created and data from the Original DBF is read and appended to the temporary dbf. TsBrowse uses the Temp dbf for display. While editing using TsBrowse, I update the original DBF and the temporary dbf (Temp dbf is updated by TsBrowse itself)
I would suggest you to edit an array (is faster) and update your database when you consider data is ok.

Regards.

Manuel Mercado
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Postby anserkk » Fri Jun 20, 2008 10:27 am

Dear Mercado,

Thankyou for your support.
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 55 guests