Hi,

Without getting into the mx_internal namespace, this is an option;


<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow
   xmlns:mx="http://www.adobe.com/2006/mxml";
   layout="absolute"
   width="400" height="300">

   <mx:Script>
       <![CDATA[

           private var _draggable:Boolean = false;

           /**
            * Determines if the title window is draggable.
            */
           public function get draggable():Boolean
           {
               return _draggable;
           }

           /**
            * Determines if the title window is draggable.
            */
           public function set draggable(value:Boolean):void
           {
               _draggable = value;
           }

           /**
            * Override the dragging method to block drag.
            */
           override protected function startDragging(event:MouseEvent):void
           {
               if (_draggable)
               {
                   super.startDragging(event);
               }
           }

       ]]>
   </mx:Script>

</mx:TitleWindow>


Other than the above for a custom mxml component, this is about the best you
can get becasue the titleBar property is protected.

Peace, Mike

On 11/30/06, Roman Protsiuk <[EMAIL PROTECTED]> wrote:

  Hi, everyone.

I guess there is some way to make TitleWindow not draggable, isn't there?
Tried
titleBar.mouseEnabled = false;
that didn't help.

Any ideas?

Thanks,
R.



--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.

Reply via email to