Xbrowse and oBrw:RestoreState()

Xbrowse and oBrw:RestoreState()

Postby vilian » Tue Aug 27, 2024 11:00 pm

Hi Guys,

I have a xbrowse where I'm adding columns at runtime, throught the command bellow:

ADD COLUMN TO XBROWSE oBrw DATA {|| oLbxBrw:oDbf:Fields(cCampo):value } HEADER cCampo size 150.

IF I use cStat := oBrw:SaveState() and after execute oBrw:RestoreState(cStat) the columns I have added at runtime are not being restored. Do you know why?

Other thing - Is there any way to know that the user made a change in the xbrowse layout ?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 982
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Xbrowse and oBrw:RestoreState()

Postby nageswaragunupudi » Wed Aug 28, 2024 3:26 pm

We will check.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Xbrowse and oBrw:RestoreState()

Postby nageswaragunupudi » Thu Aug 29, 2024 2:07 am

Before answering the main question I am a bit curious about this command:
Code: Select all  Expand view  RUN
ADD COLUMN TO XBROWSE oBrw DATA {|| oLbxBrw:oDbf:Fields(cCampo):value } HEADER cCampo size 150.


Why are we including the data from a totally different browse oLbxBrw in a different browse oBrw?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Xbrowse and oBrw:RestoreState()

Postby vilian » Fri Aug 30, 2024 11:23 am

Sorry,
I just copy the command wrong. The right is:

ADD COLUMN TO XBROWSE oLbxBrw DATA {|| oLbxBrw:oDbf:Fields(cCampo):value } HEADER Rtrim(oVfa5:titulo) SIZE aFields[oBrw:nAt,3]*10
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 982
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests