Yes, the automatic dragging is available
when you use the PopUpManager, not just whenever it’s on screen. There
are examples out there of hooking up dragging capabilities without the popup
manager (http://coenraets.com/viewarticle.jsp?articleId=89
is one).
Matt
I would like to confirm that the TitleWindow is automatically
Draggable.
I've heard this a couple times, and wanted to just
test out a simple
app, that contains only a Title Window. I
also made sure that the
Application container took 100% of the desktop
space, in order to give
space for which to drag the Title Window.
When running the app, I attempt to drag the Title
Window - and nothing
happens. I am in the beginning stages of
creating popup windows, etc.
and just wanted to experiment a little bit, before
jumping into more
advanced code.
Or can a window only be dragged, if I use the
PopUp manager class to
instantiate the window?
Just a little confused as to what I've been
hearing.
Could you all clarify that for me?
Thanks,
Mike
-----Original Message-----
From: [email protected]
[mailto:[email protected]]
On
Behalf Of Manish Jethani
Sent: Tuesday, May 31, 2005 6:44 PM
To: [email protected]
Subject: Re: [flexcoders] Questions on Containers,
and their
"drag-ability"
On 5/30/05, Mike Anderson
<[EMAIL PROTECTED]> wrote:
> No matter which container I choose however,
it would be nice to have
> them be able to be dragged across the desktop
space. Just like the
> Alert box - which is automatically dragable.
[...]
The TitleWindow is automatically draggable.
The TitleWindow implements
the Box layout by default. If you want to
use some other layout, you
can put all your stuff within another container
inside your
TitleWindow-derived class.
Pseudocode for sample TitleWindow-based MXML
component:
<mx:TitleWindow>
<mx:Tile>
<!-- stuff
-->
<mx:Tile>
</mx:TitleWindow>
Then you can pop up the TitleWindow-based
component using
PopUpManager.createPopUp()
> With all this said, is there anything I
should keep in mind, when
> selecting the proper containers (which will
act like popup windows
> with title bars), etc.?
The only container that support automatic dragging
is the TitleWindow.
As mentioned above, you can wrap all your stuff
inside a TitleWindow
inside another container like Tile or Canvas to
get the desired effect.
> What is the proper method, of giving any type
of window (or container
> for that matter), the ability to be dragged
around?
TitleWindow is the best option. If you still
want to write your own
dragging code, here's an example of draggable
images:
http://www.flexauthority.com/Samples/delicious/WhatsCooking.mxml?version
Checked=true
http://manish.revise.org/flash/flex/delicious.zip
Yahoo! Groups Links
Yahoo! Groups Links