Page 1 of 1

How to Get & Set WorkArea interactively ?

Posted: Sat Mar 21, 2009 2:39 pm
by CCH4CLIPPER
Hi Marek, Escigi & Rathingiri

Pertaining to a BROWSE, how does one interactively get/set workarea ?
In other words, what are the codes to change the WorkArea of an Active BROWSE ?

FYI, I have been struggling on this issue for the past 1 week :cry:

TIA

CCH
http://cch4clipper.blogspot.com

Re: How to Get & Set WorkArea interactively ?

Posted: Sat Mar 21, 2009 6:51 pm
by mol
I don't know, if it's possible because WORKAREA property of Browse is available at control definition only.

Marek

Re: How to Get & Set WorkArea interactively ?

Posted: Sat Mar 21, 2009 9:57 pm
by esgici
Hi CCH

I'm afraid that I don't understood your question.

What is meaning of changing the WorkArea of an Active BROWSE ?

In other words, what's your intention to make after achieving this change ?

Regards

--

Esgici

Re: How to Get & Set WorkArea interactively ?

Posted: Sun Mar 22, 2009 3:07 am
by CCH4CLIPPER
Hi Escigi

Once the workarea is changed, I expect BROWSE to display the contents of the new workarea


CCH
http://cch4clipper.blogspot.com

Re: How to Get & Set WorkArea interactively ?

Posted: Sun Mar 22, 2009 4:35 am
by sudip
Ok, but if I'm not woring, as per help file (hmg_hlp.chm), we can set WORKAREA during definition of browse only! Cannot change on the fly!

Regards.

Sudip

Re: How to Get & Set WorkArea interactively ?

Posted: Sun Mar 22, 2009 5:29 am
by dhaine_adp
This is what I do whenever I need to change the workarea in browse:

function Main()

define window MyMain.....
:
:
: other control definitions
@ row, col BROWSE brwMyFile ... ALIAS "MYFILE"

end window


static function ReStateBrw()

MyMain.brwMyFile.Release
@ row, col BROWSE brwMyFile ... ALIAS "DIFFILE"
RETURN NIL

-----------------------------

It's not a working sample but I am pretty sure you would get the point. It's just a function to release and re-state the browse. You migth even switch back to the original workarea using the same routine, just simply add parameters.

I don't know if that helps you. But I used to do like these, release and re-state the browse. The only question that remains is when and which event you are going to tie the release and re-state. That depends on your program requirements.

Re: How to Get & Set WorkArea interactively ?

Posted: Sun Mar 22, 2009 6:42 am
by sudip
It's great!

Thanks a lot!

Sudip

Re: How to Get & Set WorkArea interactively ?

Posted: Sun Mar 22, 2009 9:46 am
by CCH4CLIPPER
Hi dhaine_adp

Yup, I think this should be workable.
I was moving towards this line of thought.

TQVM


CCH
http://cch4clipper.blogspot.com

Re: How to Get & Set WorkArea interactively ?

Posted: Sun Mar 22, 2009 10:00 am
by esgici
Hello

By using TAB we can easily switch between browses / workareas.

Regards

--

Esgici

Re: How to Get & Set WorkArea interactively ?

Posted: Sun Mar 22, 2009 1:20 pm
by CCH4CLIPPER
Hi Escigi

This is a good suggestion :-)


CCH
http://cch4clipper.blogspot.com