How to Get & Set WorkArea interactively ?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
CCH4CLIPPER
Posts: 140
Joined: Tue Mar 03, 2009 8:59 am

How to Get & Set WorkArea interactively ?

Post 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
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: How to Get & Set WorkArea interactively ?

Post by mol »

I don't know, if it's possible because WORKAREA property of Browse is available at control definition only.

Marek
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: How to Get & Set WorkArea interactively ?

Post 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
Viva INTERNATIONAL HMG :D
CCH4CLIPPER
Posts: 140
Joined: Tue Mar 03, 2009 8:59 am

Re: How to Get & Set WorkArea interactively ?

Post 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
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: How to Get & Set WorkArea interactively ?

Post 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
With best regards,
Sudip
User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines

Re: How to Get & Set WorkArea interactively ?

Post 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.
Regards,

Danny
Manila, Philippines
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: How to Get & Set WorkArea interactively ?

Post by sudip »

It's great!

Thanks a lot!

Sudip
With best regards,
Sudip
CCH4CLIPPER
Posts: 140
Joined: Tue Mar 03, 2009 8:59 am

Re: How to Get & Set WorkArea interactively ?

Post 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
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: How to Get & Set WorkArea interactively ?

Post by esgici »

Hello

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

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
CCH4CLIPPER
Posts: 140
Joined: Tue Mar 03, 2009 8:59 am

Re: How to Get & Set WorkArea interactively ?

Post by CCH4CLIPPER »

Hi Escigi

This is a good suggestion :-)


CCH
http://cch4clipper.blogspot.com
Post Reply