How to Get & Set WorkArea interactively ?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

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: 3409
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 268 times
Been thanked: 173 times
Contact:

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: 4538
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 410 times
Been thanked: 118 times
Contact:

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: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

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: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 2 times

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
Been thanked: 2 times

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: 1446
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India
Has thanked: 5 times
Been thanked: 2 times

Post by sudip »

It's great!

Thanks a lot!

Sudip
With best regards,
Sudip

CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

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: 4538
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 410 times
Been thanked: 118 times
Contact:

Post by esgici »

Hello

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

Regards

--

Esgici
Viva INTERNATIONAL HMG :D

CCH4CLIPPER
Posts: 130
Joined: Tue Mar 03, 2009 8:59 am
Been thanked: 1 time

Post by CCH4CLIPPER »

Hi Escigi

This is a good suggestion :-)


CCH
http://cch4clipper.blogspot.com

Post Reply