Hi Ania,
You should be able to set modality after
initial creation. However, as currently implemented the modal switch is only
acted upon when the panel/dialog is made visible (this should be fixed, so that
setting modal on an already visible container enables the modality handling –
I’ll look into this for a future release). For your use case it sounds
like the container is never hidden, so the “beforeShow” event is
never fired – which initiates the creation/showing of the mask.
You can probably achieve the same results
by invoking:
panel.buildMask();
panel.bringToTop();
panel.showMask();
After you set modal:true on an already
visible panel.
Hope that helps.
Regards,
Satyen
From:
Sent: Monday, January 12, 2009
3:19 PM
To:
Subject: [ydn-javascript] Re:
Changing panel's modal attribute
I'm still hoping someone can let me know if this is
possible, changing
the 'modal' property of a panel after it has been created. If that is
not possible, I will try a different tact, but I would like to know
the answer to this approach first.
Thanks much,
Ania.
--- In ydn-javascript@
>
> I don't mean to press, but does anyone have an idea about changing
> modality of a panel once it was created?
>
> Thank you,
> Ania.
>
> --- In ydn-javascript@
> >
> > Any ideas on this?
> > Thanks much,
> > Ania.
> >
> > --- In ydn-javascript@
> > >
> > > I create a panel into which I display a flex widget in an
iframe. The
> > > cost of creating the widget and its utility is such that we want
to
> > > create it once and hide it when not shown. Because of quirks in
> > > browsers, hiding a flex widget often makes its external
APIs/functions
> > > impossible to access, therefore I "hide" the panel,
with flex in an
> > > iframe in it, by putting it at negative xy coordinates. That
seems to
> > > work fine. However, there is an issue with modality. When first
> > > creating the panel I create it "modal:false" as it is
only
created and
> > > put off-screen (not shown), however, when the panel is to be
shown we
> > > want it modal. I tried:
> > >
> > > myPanel.cfg.
> > >
> > > but that didn't work, ie the panel still showed up modless. Is
there
> > > a way to change the `modal' attribute of a panel once it is
created?
> > >
> > > Thank you,
> > > Ania.
> > >
> >
>