Yeah, Label uses Flash Textfield, But for ContextMenu, a textfield should be
selectable/editable.


Following is simple example for context-menu, if you already know how to do
it, ignore it.

##ContextMenuExample.mxml##

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";
initialize="addContextMenu();">
<mx:Script>
<![CDATA[
        
        
        
        function addContextMenu()
        {
            var _cm:ContextMenu;
            var about_cmi:ContextMenuItem;
                _cm = new ContextMenu();
                about_cmi  = new ContextMenuItem("About This App",
mx.utils.Delegate.create(this,showAbout));
                _cm.customItems.push(about_cmi);
                _cm.hideBuiltInItems();
                mx.core.Application.application.menu = _cm;
        }
        
        function showAbout()
        {
                alert("Context Menu Example App v 1.0");
        }
        
]]>
</mx:Script>
</mx:Application>


-abdul


 

-----Original Message-----
From: viraf_bankwalla [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 13, 2005 5:45 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Grid Header ContextMenu



Thanks

UIObject extends MovieClip - so I thought that I could simply add it 
to any object.  How do I find out which Flex components use the 
Flash TextField ? (Do Labels use the text field ?)

Do you have an example ?


- viraf


--- In flexcoders@yahoogroups.com, Abdul Qabiz <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> We only support context-menus at application level only, not to 
any children
> of application or to nested objects. However you can add context-
menu items
> to TextInput, TextArea or anything that uses a Flash TextField.
> 
> Hopefully, in future context-menu would be supported for nested 
objects.
> 
> 
> But there is workaround, you can add/remove context menu items to 
main
> context menu depending upon where mouse pointer is....So if user 
right
> clicks on header, you can detect that mouse pointer is on datagrid 
header
> and add context menu items...
> 
> Does it make sense?
> 
> -abdul
> 
> 
> -----Original Message-----
> From: viraf_bankwalla [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, April 13, 2005 5:10 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Grid Header ContextMenu
> 
> 
> 
> Hi,
> 
> How do I create a context menu for my Header in a grid?  I have a 
> HeaderRenderer and tried to cast it to a MovieObject and set the 
menu 
> attribute, however this did not work.
> 
> Thanks.
> 
> - viraf
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links





 
Yahoo! Groups Links



 





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to