FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse - Save State
Posts: 82
Joined: Fri Mar 03, 2006 06:26 PM
xBrowse - Save State
Posted: Tue Oct 08, 2013 08:54 AM

Hello Everyone,

Is it possible to save the state of the browse, where the selected row is fourth from top so when the browse is restored, the selected row stills shows fourth and not at the top of the browse?

For Example:

row one
row two
row three
row four <- Selected Row
row five
row six
etc.

After Restore, it shows thus:

row four <- Selected Row
row five
row six
row seven
row eight
row nine
etc.

Any Ideas?

TIA,
David

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse - Save State
Posted: Tue Oct 08, 2013 07:45 PM

cSave := oBrw:SaveState( { "KeyNo", "nRowSel" } )

later
oBrw:RestoreState( cSave )

Regards



G. N. Rao.

Hyderabad, India
Posts: 82
Joined: Fri Mar 03, 2006 06:26 PM
Re: xBrowse - Save State
Posted: Wed Oct 09, 2013 09:12 AM

Once again, thank you Rao. So simple :)

Are there any notes available on xBrowse apart from those in the prg?

David

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: xBrowse - Save State
Posted: Wed Oct 09, 2013 09:26 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: xBrowse - Save State
Posted: Wed Oct 09, 2013 09:59 AM

Hello,

I can´t find the information about SaveState.

I would like to save the selected cols by the user by drag and drop, also the cols that the user hided by right click.

Thank you!!!.

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse - Save State
Posted: Wed Oct 09, 2013 10:00 AM
elvira wrote:Hello,

I can´t find the information about SaveState.

I would like to save the selected cols by the user by drag and drop, also the cols that the user hided by right click.

Thank you!!!.

All that info is saved and restored by default.
Regards



G. N. Rao.

Hyderabad, India
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: xBrowse - Save State
Posted: Wed Oct 09, 2013 10:12 AM

Hello,

How?.

Where is it located?.

If I have several browses, how can I distingish each one?.

Thank you;))

Posts: 82
Joined: Fri Mar 03, 2006 06:26 PM
Re: xBrowse - Save State
Posted: Wed Oct 09, 2013 10:23 AM

Elvira,

It is saved to a static variable. If you exit the application, I presume you can save it to an ini.

David

Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: xBrowse - Save State
Posted: Wed Oct 09, 2013 11:30 AM

Hello,

Thank you.

Mr. Nages, could you please add to this feature to save the status of AUTOSORT feature?

)

;)

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse - Save State
Posted: Wed Oct 09, 2013 11:34 AM

I had already done what all could be done from our side.
Programmer can decide what DATAs are to be saved in addition to the default DATAs.

cState := oBrw:SaveState( <ArrayofAdditionalDataNames> )
example
cState := oBrw:SaveState( { "lAutoSort" } )

Regards



G. N. Rao.

Hyderabad, India
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: xBrowse - Save State
Posted: Wed Oct 09, 2013 11:51 AM

Mr. Nages,

Thank.

But if its posible to know in wich column did the user clicked on the autosort?.

I.e, name, ascending.

Kind regards,

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse - Save State
Posted: Wed Oct 09, 2013 02:02 PM

At what stage do you want to know? and the purpose?

Regards



G. N. Rao.

Hyderabad, India
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: xBrowse - Save State
Posted: Wed Oct 09, 2013 05:05 PM

Mr. Nages,

I use ADO and autosort. I can sort by every column and select asc/desc order.

That´s fantastic feature!!.

I want to sabe wich was the last column select for order and if it was asc or desc order.

It wold be very interesting for future releases :D :D :D

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse - Save State
Posted: Wed Oct 09, 2013 05:10 PM

Last sorted column's data cOrder is 'A' if ascending and 'D' if descending. For all other columns cOrder is empty.
You can find it by Scanning aCols.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion