Re: OPO v2.0 Question: Closing modal window
Date: 1997/09/18
Message-ID: <34219F7E.79EB_at_zg.tel.hr>#1/1
Phil Herring wrote:
>
> In article <341D76B4.4EA2_at_zg.tel.hr> Goran Jemric, goran.jemric_at_zg.tel.hr writes:
> >I have a problem using OPO v2.02 (32 and 16 bit).
> >I open a modal form from a parent form (to use it
> >for a list of values). When user selects value I close
> >the modal form and go back transffering value through
> >application properties. If I close the modal form
> >with CloseWindow() method everything is OK but my
> >parent form appeares to have no standard toolbar
> >and menus.
>
> Don't use CloseWindow() to close a modal window - as you have discovered, it
> will screw things up. If you're using a modal window in the standard
> fashion, you'll have one or two buttons (usually "OK" and "Cancel", in
> whatever language you're using) that close the window. For each of these
> buttons:
>
> 1. Set their IsDismissButton properties to TRUE.
> 2. In their Click() methods, do whatever processing you need to
> do. (Usually, either a commit or rollback.)
> 3. End the Click() methods with a call to Inherited.Click() to
> dismiss the window.
> 4. To open the modal window, just call frmYourFormName.OpenModal(FALSE)
> The modal window will dismiss itself - don't try to close it
> after the call to OpenModal returns.
>
Thank You for Your time to answer my question, but this doesn't solve my
problem.
If I close modal window the way You say, when I get back to calling
form, rollback
and commit buttons on the form toolbar are disabled so I can not do
anything.
System does not allow You to exit form before commiting or rolling back.
But, You can't do it.
Also, I use modal form for List Of Values (LOV). Every time I call the
LOV form
I change Translate property of a list control in InitializeWindow
method. If I
don't close the form but dismiss it this piece of code doesn't work
second time
I call it.
Thank You anyway.
-- Goran +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Gargle twice daily - see if your neck leaks. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Received on Thu Sep 18 1997 - 00:00:00 CEST