Flex :: Custom Context Menu For A Component?

Mar 21, 2011

I have a Flex application, running with Flash Player, not AIR, that contains a Tree that I would like to put a custom context menu on.

Tried just doing <mx:Tree ... contextMenu="{MyClassWithStatic.menu}">, but that didn't do anything.

Went searching, and found this quote from some Adobe docs somewhere

In Flex or Flash Builder, only top-level components in the application can have context menus. For example, if a DataGrid control is a child of a TabNavigator or VBox container, the DataGrid control cannot have its own context menu.

so went upwards, trying each parent element until I reached my <Application>-element, which is consistent with what they wrote.

Tried making a Flex component, based on Group (the default) which contained my tree, and the context menu on the top-level element there, hoping it would work, but to no avail.

Is there any other way to manage this that I haven't found yet?

The code I use to create the menu:

var menuItems:Array = [];
var rename:ContextMenuItem = new ContextMenuItem("Rename");
rename.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,

[Code].....

View 3 Replies


Similar Posts:


Flex :: Add Custom Component In Context Menu Of Datagrid?

Feb 22, 2010

How to add custom component in context menu of datagrid.Here custom component like one text box with formatting details.

View 1 Replies

Flex :: Cannot See Context Menu On UI Component

Mar 22, 2011

I have a UIComponent (tried it also with Canvas) and some icons in it (sub views). On the UIComponent I defined some extra ContextMenuItems. Now when I'm testing it, the context menu appears only on the subviews (icons) with a right-click. I've checked the documentation but found nothing about required properties for using context menus. Why it's only on subviews?

View 3 Replies

Flex :: Custom Context Menu WITH Selectable Enabled In AS3

Jun 6, 2009

I have a Label in AS3 that I want to be selectable (.selectable = true) AND I want the clipboardMenu to show up on right-click ALONG with custom menu items.

If I do THIS:

var label:Label = new Label();
label.text = "test";
label.selectable = false;

[Code]....

The label IS selectable - however ONLY the clipboard menu items are present.

How can I both make the label selectable AND have a menu with my custom items + standard clipboard items?

BTW - this is with an AIR application using the 3.2 SDK.

View 1 Replies

Actionscript 3 :: Add A Custom Context Menu With Line Separators In Flex

Mar 18, 2010

I would like to add a custom context menu with line separators, but can't really figure out how. What I need:

[Code]....

View 2 Replies

Flash :: Custom Cursor And Customized Context Menu In Flex

Jun 24, 2010

My Flex 3 application uses a custom cursor and has to show a customized context menu when the user performs a right click. The problem is the customized menu is shown only when the default arrow cursor is shown. When I change it to the custom cursor, the standard context menu appears instead of the customized one.

Is there a way to have both custom cursor and customized context menu in a flash application?

View 3 Replies

Flash - Open Custom Context Menu On Text Area Cortrol In Flex?

Dec 27, 2011

How i open my custom menu over right click on Text Area control, currently default menue of paste, Copy, Cut etc is opened.Please keep in mind that i want to open custom context menu over TextArea Control of Flex.

View 1 Replies

ActionScript 2.0 :: Create A Custom Context Menu (right Click Menu) In Flash?

Dec 7, 2002

Anybody know how to create a custom context menu (right click menu) in Flash?

If it's not possible, wouldn't it be a good idea for Macromedia to put some kind of event or something in there?

View 11 Replies

ActionScript 3.0 :: Context Menu - Add A Right Click Menu With A Custom Item? ?

Oct 8, 2009

i wanted to place some credits item in the right button menu (no links, so no events, just a label with credits). i was looking the contextmenu help, and there is an example of how to add items, disable default items and so on, but i could not find how to attach the menu to the movie (the basic part). i tried both on 'stage' and it tells me that stage does not have a property called contextMenu, so i tried to attach it to a sprite, it runs ok and compiles ok but when i right click on the sprite i get the default menu

var _menu_item:ContextMenuItem = new ContextMenuItem("here goes [code].....

how to add a right click menu with a custom item?

View 3 Replies

Javascript :: Flash - Custom Context Menu?

Jun 12, 2010

Is there a way to add custom fields to the built in browser context menu using Javascript?I know flash/actionscript can do this, how are they doing it? Example: right click onand see the custom context menu.Is this possible with pure javascript or do you have to use flash?Note, I'm looking for adding to the built in browser context menu, not using custom javascript popups to mimic them.

View 2 Replies

ActionScript 3.0 :: Custom Context Menu In Class

Aug 20, 2009

Is it possible to place code for a custom context menu in an external class, and then call the class when you need it.

View 4 Replies

ActionScript 3.0 :: How To Set Custom Context Menu On MovieClip

Apr 26, 2010

Context Menus. How can I set a custom context menu on a movieclip, so that if a different movieclip (without a custom context menu) overlaps it (on a higher layer), that when right clicked, the correct context menu comes up.

View 1 Replies

ActionScript 2.0 :: Custom Context Menu Not Showing Up?

Dec 7, 2005

I have set a custom context menu in a .swf, and I can see it normally when previewing it on flash (Test Movie).However, when I see it on my browser, I can't see the custom options (only the reduced context menu with settings and about macromedia...)On my first frame I have an actions layer with this (context + loader):

[AS]
root_cm = new ContextMenu();
root_cm.hideBuiltInItems();
root_cm.customItems.push(new ContextMenuItem("Add to Favourites", itemHandler1))
root_cm.customItems.push(new ContextMenuItem("send e-mail", itemHandler2));

[code]....

View 8 Replies

Professional :: Have Multi-tiered Custom Context Menu?

Aug 9, 2010

Is there a way to have multi-tiered custom context menus using AS3? i.e. I would like for a user to be able to click or hover a menu item which would bounce out another menu of options associated with it.

View 3 Replies

ActionScript 2.0 :: Get A Custom Context Menu To Just Display New Text?

Jun 25, 2004

How does one get a custom context menu to just display new text so when you right click it says like:

Settings
About Macromedia Flash

and

"Copyright 2004 My webpage"

What would be the code for this?

View 7 Replies

Actionscript 3 :: Flex - Create Context Menu In AIR Application - Add Sub Menu Against Any Parent Item?

Sep 21, 2011

How create Context menu in AIR application plus how add sub menu against any parent item in Flex?

View 2 Replies

Flex :: Context Menu For Loaded SWF

Oct 14, 2009

I have a Flex app with a viewport that loads a series of other swfs. I would like to place a context menu over top of the SWFs when the user right-clicks. To that end, I have set up a fairly standard context menu where each item has a ContextMenuEvent.MENU_ITEM_SELECT event handler. One problem: The eventHandler never gets called.

If I place the context-menu code anywhere else in the app, i.e. not on top of a loaded SWF, everything works fine. However, when I place the exact same code on the SWF viewport, the context menu items appear, but the eventHandlers are never called.

View 2 Replies

Flex :: Add Context Menu In Datagrid?

Feb 3, 2010

How we add context menu in datagrid column header.

View 1 Replies

Flex :: Remove The 4 Context Menu?

Feb 20, 2011

On my web app, I want to be able to remove the Flash context menu and only leave the ones really needed like the textarea contextmenu.

View 1 Replies

Flex :: Get Parent Of Context Menu?

Jul 27, 2011

Is there any way to know the parent/component which initiates context menu? I have a panel which contains different custom components. i want to open respective popup window of custom component from context menu when user right click on the respective component.

How can i find the parent custom component which initiates context menu?

for ex:

custom compoent: 1. Label, 2. Buttom

context menu Item: properties

On right click over 'Label' opens a context menu which has item 'properties', on clicking properties it should open custom popoup window showing properties of Label. similarly, for Button.

I am trying to listen Event on click of context menu, but it is not useful.

View 1 Replies

Flex :: Create Submenu In Context Menu?

May 27, 2010

Is it possible to create submenu in context menu (right click menu) in Adobe Flex?

Menu1 >
- Menu1.1
- Menu1.2

[code].....

View 2 Replies

Flex :: Create Submenu's In Its Context Menu?

Feb 2, 2011

Is there any workaround to create submenu in a flex context menu other than stopping right click from javascript.

View 1 Replies

Flex :: Copy And Paste Missing In Context Menu?

Mar 31, 2011

I'd like to add copy and paste functionality to context menu in my Flex application. After creating a separate dummy project for testing, I realize that such options (cut, copy, paste, and delete) are already available in this dummy project without any coding. Both projects are compiled using Flex 4 SDK, run in the same brower (IE) and have the same version of Flash Player (10.2.153.1). However, different context menu are displayed. Here are the difference:

Orig Project: Print, Show Redraw Regions, Debugger, Settings, Global Settings, About Flash Player...

Dummy Porject: Cut, Copy, Paste, Delete, Select All, Settings, Global Settings, About Flash Player...

View 1 Replies

Flash :: Determine The Location Of A Context Menu In Flex?

May 13, 2011

I am trying to find the best way to improve the user experience when interacting with a context menu in a Flex application. I already know that the context menu in Flex is quite limited in terms of how it is constructed and what it can show.

What I was hoping to do was to implement something similar to what Microsoft Word does in 2010 or later, where when right clicking a little floating palette is displayed above the common popup menu. I was hoping that there was a way to 1) listen for an event that is triggered when a context menu is displayed, and 2) determine the location of the context menu so that I could display a floating palette above the context menu as in Word. So far, I have not found out how to accomplish either of these things.

I suspect that there might be some focus and stage management issues with this approach generally, but I was hoping to at least get to the point where those issues were discovered.

View 1 Replies

Flex :: Context Menu Not Working In Flash Player 10.1

Jun 23, 2011

I write a flex application. I added some custom menu items in context menu. when I compiled this code using flashplayer 10.0, it works fine and my added context menu items are shown when I Right-Click. But when I compile same code for flashPlayer 10.1, menu items that I added in context menu are not shown when I Right-Click. I am using sdk 3.5.

I am doing this;
private var cm:ContextMenu = new ContextMenu();
var versionMenu:ContextMenuItem = null;
var dateMenu:ContextMenuItem = null;
if(model.appVersion.length > 0) {
versionMenu = new ContextMenuItem(model.appVersion);
[Code] .....

View 2 Replies

Flex :: Hyperlink - Control The Context Menu On A Link In HtmlText When?

Jul 16, 2009

I created a Flex application with a textArea. I'm populating the textArea's htmlText property.I have a context menu on the textArea, but I don't see how to make a different context menu when the user right clicks on a <a href...>link</a>. Can I control the context menu for a link displayed inside of the htmlText of a mx:TextArea?

View 1 Replies

Flash :: Hidden/show Particular Context Menu Item In Flex?

Apr 26, 2010

var contextMenu:ContextMenu = new ContextMenu();
contextMenu.hideBuiltInItems();
var contactList : ContextMenuItem = new ContextMenuItem("Add to Existing List");

[Code]....

All coding on contactListItemRenderer.as and call to datagrid like

<mx:DataGridColumn itemRenderer="com.view.Contact.ContactListItemRenderer"
dataField="fullName" headerText="Full Name" />

View 1 Replies

Actionscript 3 :: Flex 4 Disptaching Custom Event From Custom Component (why Flex Converting Custom Event To Mouseevent)?

Mar 2, 2012

This is NOT duplicate of my earlier post (its is slightly different)But this is similar issue with similar error but its not the same error The error I am getting now is below while dispatching the custom event from my custom component

TypeError: Error #1034: Type Coercion failed: cannot convert events::MapEvent@a74ab51 to flash.events.MouseEvent.
dispatchEvent(new MapEvent(MapEvent.CLICKED_ON_MAP));

Note: The error in my earlier post is giving below error message

Type Coercion failed: cannot convert flash.events::Event@81ecb79 to com.events.ShopEvent

The difference here are two things, the earlier error is while converting flash event to custom event and now this one is while converting custom event to flash event and secondly, I have no clue why it is trying to convert to the mouseevent where I am just dispatching my custom event with proper listeners.

This is my custome event

package events
{
import flash.events.Event;
import ui.map.MapElement;

[code]...

View 1 Replies

Actionscript 3 :: Hide Default Options In Right Click Context Menu In Flex?

Oct 16, 2009

I'm developing a flex application and I want to add it a context menu. I got it with this

code:
var myMenu:ContextMenu = new ContextMenu();
myMenu.hideBuiltInItems();

[code]......

View 2 Replies

ActionScript 2.0 :: "attaching" A Custom Context Menu On The 'picture' Movieclip (empty Movieclip That Holds Externally Loaded Pics)

May 5, 2006

I tried "attaching" a custom context menu on the 'picture' movieclip (empty movieclip that holds externally loaded pics) but with no luck.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved