Vince,
I use this "Browse then Edit" feature extensively and do the following.

1. Make the Browse window and the edit window normal - i.e non modal.

2. Set the Edit window datasession to be private.

3. Call the Edit window with the key which indicates the record that is
required to be edited.

4. In the init() of the Edit window, retrieve the record from the file via
the passed "Key" end then go into edit mode. The private datasession means
that you can use the browse window multiple times and also use the main
menu.

5. Just one word of caution though. If you edit any data in the edit window
that affects the display in the browse, then this will not be updated
immediately on return from the edit window - the reason being that this
return can be done at any time, even when the browse window has been closed
because the edit window is now not connected to the browse window at all. So
you need to use the "set refresh to " setting so that the browse will
refresh on a regular basis. 

As a matter of fact I also pass the "Thisform" object reference from the
brows form as well as the Key detailed above. If you have a general
"Browse_Refresh" in the Browse form then this can be called from the edit
before it unloads but you do need to check thet the "Thisform" object
reference exists first!

Dave Crozier

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Vince Teachout
Sent: 17 February 2009 18:57
To: ProFox Email List
Subject: Need some help - Modal Screens and Menus

Hi all,

I have a screen that has a browse based on a query, and double clicking 
a row opens an edit screen on that row.  Closing the edit brings you 
back to the browse.  Any changes made and saved on the edit screen are 
updated on the browse, thanks to requery().

To do this, I've been making the edit screen modal.

Works good enough, but the user has a need to be able to use the 
program's main menu options.  Since the form is modal, the items are 
greyed out.

I tried to get around this by making making the edit form modeless, and 
doing this in the calling form:

Thisform.hide()
DO EditForm with Thisform  && EditForm issues Show() in Destroy event
Requery()

The hide part works ok, but requery happens immediately.

I also tried adding a READ EVENTS before calling EditForm, and issuing 
CLEAR EVENTS in EditForm destroy, but of course, that didn't work.

Is there a way to either:

1. Make the Edit Form Modeless, and make the Calling form suspend 
operation until the Edit form is closed?

2. Leave the Edit form Modal, but still be able to access the menu items?

Would appreciate any help.  thanks.


[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/87a212bbcbb346f9a599bc8553d94...@gozap
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to