Why the Clipboard items are disabled?

Hello

Here's a test case, the simple configuration that should work out of the box: AdvancedDataGrid with 3 columns and ContextMenu with the Clipboard menu enabled.

<? XML version = "1.0" encoding = "utf-8"? >

" < = xmlns:fx s:Application ' http://ns.Adobe.com/MXML/2009 "

xmlns:s = "library://ns.adobe.com/flex/spark".

xmlns:MX = "library://ns.adobe.com/flex/mx".

minWidth = "800".

minHeight = "600".

creationComplete = "application1_creationCompleteHandler (event)" >

< fx:Script >

<! [CDATA]

Import mx.collections.ArrayCollection;

Import mx.controls.Alert;

Import mx.events.FlexEvent;

[Bindable]

private var cm:ContextMenu;

[Bindable]

private var advancedDataGridDataProvider:ArrayCollection = new ArrayCollection();

protected function application1_creationCompleteHandler(event:FlexEvent):void

{

CM = new ContextMenu();

cm.hideBuiltInItems ();

cm.clipboardMenu = true;

cm.clipboardItems.copy = true;

cm.clipboardItems.cut = true;

cm.clipboardItems.paste = true;

cm.clipboardItems.selectAll = true;

advancedDataGrid.addEventListener (Event.COPY, advancedDataGrid_onEvent);

advancedDataGrid.addEventListener (Event.CUT, advancedDataGrid_onEvent);

advancedDataGrid.addEventListener (Event.PASTE, advancedDataGrid_onEvent);

Just fill with garbage

for (var i: int = 0; i < 10000; i ++)

{

var o: Object = new Object();

o.Col1 = Math.Random ();

o.col2 = Math.Random ();

o.COL3 = Math.Random ();

advancedDataGridDataProvider.addItem (o);

}

}

private void advancedDataGrid_onEvent(evt:Event):void

{

Alert.Show (evt.type);

}

[]] >

< / fx:Script >

< fx:Declarations >

<! - Place non-visual elements (e.g., services, items of value) here - >

< / fx:Declarations >

< mx:AdvancedDataGrid contextMenu = "{cm}.

dataProvider = "{advancedDataGridDataProvider}".

ID = "advancedDataGrid"

designViewDataType = "flat".

selectionMode = "multipleCells."

left = "10".

Top = "10".

right = "10".

Low = "10" >

< mx:columns >

< mx:AdvancedDataGridColumn headerText = "column 1".

dataField = "col1" / >

< mx:AdvancedDataGridColumn headerText = "column 2".

dataField = "col2" / >

< mx:AdvancedDataGridColumn headerText = "column 3".

dataField = "col3" / >

< / mx:columns >

< / mx:AdvancedDataGrid >

< / s:Application >

If I run the present, select one or more cells, then right click to get the context menu, all context menu items to Clipboard (copy, paste etc.) are DISABLED. Why is this? More curiously, if I right click precisely between the lines - the items are suddenly turned on!

Thanks for the reply.

I've experimented with itemRenderers without success. The problem was that I used the canvas. After your post I realized that there is a class dedicated to it. To work with 4.1 simply have ADG like this:

itemRenderer = "ADGItemRenderer."

dataProvider = "{advancedDataGridDataProvider}".

ID = "advancedDataGrid"

designViewDataType = "flat".

selectionMode = "multipleCells."

left = "10".

Top = "10".

right = "10".

Low = "10" >

dataField = "col1" / >

dataField = "col2" / >

dataField = "col3" / >

ADGItemRenderer is defined as follows:

http://ns.Adobe.com/MXML/2009.

xmlns:s = "library://ns.adobe.com/flex/spark".

xmlns:MX = "library://ns.adobe.com/flex/mx".

focusEnabled = "true" >

left = '0 '.

Text = "{listdata.label}" "

Red = '0' / >

As you can see menu contex is yet ADG but items on the Clipboard are now activated.

The same trick does not work well in 3.5. It does not work with AdvancedDataGridItemRenderer. I moved ContextMenu of Assistant Director General to AdvancedDataGridItemRenderer like this:

http://www.Adobe.com/2006/mxml '.

xmlns:UI = "" Flash.UI. * ""

Copy = "clipboardHandler (Event)" "

Paste = "clipboardHandler (Event)" "

Cut = "clipboardHandler (Event)" "

selectAll = "clipboardHandler (event)" "

Clear = "clipboardHandler (Event)" > "

Import mx.controls.Alert;

protected function clipboardHandler(event:Event):void

{

Alert.Show (Event.type);

}

]]>

ID = "adgContextMenu" >

cut = 'true '.

Paste = 'true '.

selectAll = 'true '.

clear = "true" / >

The items are always disabled. WTH?

Fortunately, it works with AdvancedDataGrid ItemRendererGroup(which, I guess, has a slightly different effect). If I define ADG itemRenderer just like that (keeping ContextMenu to ADG):

http://www.Adobe.com/2006/mxml"/ >

then the items on the Clipboard are enabled. Crazy.

Tags: Flex

Similar Questions

  • Why the ESX host are disable and how to activate them?

    I've implemented the vCloud Director, which adds vCenter and created the provider vDC.

    But the hosts to vCenter are marked as disabled and is not ready and status to vDC of the provider alert watch as shown in the sceenshot.

    What is the problem and how to fix this?

    The installation guide says that we support only 4.0u2 and 4.1. ESX version number is for 4.0u1

  • Why the download options are more classified as flv, WMP, MP3 etc?

    Why the download options are more classified as flv, WMP, MP3 etc?
    All gets them one in the download dropdown is:
    (480 p), (240 p) or (360) for example and the name of the video course.
    The way it is now, I can't identify the type of video I download as I could before.
    Thank you!


  • Why the outputs that are grouped in a waveform chart in a loop of Simulation show distortion?

    Is anyone know why the outputs that are grouped in a graphic waveform distortion to see the Simulation loop unlike these forms of output wave that are placed individually in each waveform graph Microsoft Graph?


  • just turned on computer all the safety devices are disabled and will not not turn on ie... MSE DEFENDER FIREWALL

    just turned on computer all the safety devices are disabled and will not not turn on ie... MSE DEFENDER FIREWALL

    Vista Home premium 32-bit

    Hello

    Malware to disable your firewall and your safety programs.

    Scan of Malware in Safe Mode with network.

    http://www.bleepingcomputer.com/tutorials/how-to-start-Windows-in-safe-mode/#Vista

    Windows Vista

    Using the F8 method:

    1. Restart your computer.
    2. When the computer starts, you will see your computer hardware are listed. When you see this information begins to tap the F8 key repeatedly until you are presented with the Boot Options Advanced Windows Vista.
    3. Select the Safe Mode with networking with the arrow keys.
    4. Then press enter on your keyboard to start mode without failure of Vista.
    5. To start Windows, you'll be a typical logon screen. Connect to your computer and Vista goes into safe mode.
    6. Do whatever tasks you need and when you are done, reboot to return to normal mode.

    Once in Safe Mode with network, download and run RKill.

    RKill does NOT remove the malware; It stops the Malware process that gives you a chance to remove it with your security programs.

    http://www.bleepingcomputer.com/download/rkill/

    Then, download, install, update and scan your system with the free version of Malwarebytes AntiMalware in Mode safe mode with networking:

    http://www.Malwarebytes.org/products/malwarebytes_free

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    And also scan with the free version of SUPERAntiSpyware

    http://www.SUPERAntiSpyware.com/download.html

    SUPERAntiSpyware Free Edition is 100% free and will detect and remove thousands of Spyware, Adware, Malware, Trojans, KeyLoggers, Dialers, Hi-Jackers, and worms. SUPERAntiSpyware features many unique and powerful technologies and removes spyware threats that other applications fail to remove.

    SUPERAntiSpyware Free Edition does not include blocking in real time or scheduled scan.

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    THS is a very good program to scan your system to remove adware, etc.:

    http://www.bleepingcomputer.com/download/adwcleaner/

    AdwCleaner is a program that finds and removes the Adware, toolbars, potentially unwanted programs (PUP) and browser hijackers from your computer.  Using AdwCleaner you can easily more of these types of programs for a better user experience on your computer delete and while browsing the web.

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    And just to be sure, nothing is lurking in the background:

    'TDSSKiller Rootkit Removal Utility download for free'

    http://USA.Kaspersky.com/downloads/TDSSKiller

    ABon the Defender being turned OFF

    With MSE installed Windows Defender is supposed to be disabled.

    MSE has been designed with its own version of Windows Defender under its own program.

    If the two were running, it would cause system conflicts.

    See you soon.

  • Why the 'Analyze' button is disabled?

    I was wondering why the 'Analysis' button is disabled in the new disk optimizer tool. I'm able to optimize partitions of hard drive of my computer as usual, but I can't check if it must be optimised beforehand.

    Is the drive a SSD or Solid State Drive?  If so, that's why.  These readers of should not or never be defragmented.  It puts much wear and tear on the device that have a shorter life expectancy.

  • Why the temporary files are created?

    Original title: temporary files

    Hi, I searched the Web for a long time to know "why the temporary files are created?"
    what I understand so far is there are temporary files created by MS WINDOWS, and others created by other applications like MS OFFICE APPS? RIGHT?

    - and understand that they are created for purposes of backup in the case of MS OFFICE applications,- and I do not know how? they are created when the App crash or every few minutes or what?

    - and I do not understand why "windows Temp files are created?"

    Show me examples please.

    Thank you

    Hello

    There are many reasons why temporary files may need to be created.

    Windows temporary files
    https://support.Microsoft.com/en-us/KB/92635/

    Wiki - temporary file
    http://en.Wikipedia.org/wiki/Temporary_file

    Wiki - temporary Internet files
    http://en.Wikipedia.org/wiki/Temporary_Internet_Files

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" experience :="" bicycle="" -="" mark="" twain="" said="" it="">

  • The menu items are reversed in Tablet and mobile display

    I don't know what went wrong with the Web site, www.cebumerchants.com, the menu items are reversed in the mobile and view tablet, but not for the office.

    Can someone please take a look? I need to solve this problem.

    This one is pretty simple. You use float: right on your query support desktop and float: left for the little ones to your selector "nav li '...

  • Why my player buttons are disabled on my skin 8 Captivate when I add a quiz. If I remove the quiz, my buttons back on the skin.

    It would really save time to use the Captivate 8 quiz feature, but so far I am not able to because every time that I add a quiz, the buttons of the player are completely disappeared from my skin. I can't add because they are disabled.

    In preferences, I turned turn off the option to hide the buttons of the player.

    No one knows why this happens? Can I use a quiz and still have my visible back/forward buttons?

    Questions before the test should be set at the beginning of the course and they turn off automatically in navigation.

  • Why the AHCI mode is disabled in some models of Satellite P200/205?

    Hello.

    My laptop model is Toshiba Satellite P205-S6277 (PSPBGU-00W016B). Chipset Intel 945 PM Express, Intel 82801 GBM (ICH7-M).

    According to the information of the intel.com my laptop processor / chipset are fully compatible with the AHCI mode. But my SATA controller works in IDE compatibility mode and there is no way to enable AHCI SATA mode in the BIOS.

    So I have two questions correlated.

    1. why this AHCI mode is completely disabled by the BIOS? Is it possible to activate this mode in future versions of BIOS?

    2 If this mode is completely disabled by the BIOS in the models of laptop of all PSPBG and PSPB0 then why Intel Matrix Storage Manager (driver that improves the functionality of the AHCI mode) is available at downloads driver recommended for these series of laptop on sites European Canadians, Toshiba and even specially for my Toshiba laptop model on the site?

    I already posted the same question to the site we Toshiba but unanswered for a month.
    Maybe there is someone who is able to answer this question?

    >.. There is no way to enable AHCI SATA mode in the BIOS.
    How you tried to activate it exactly?
    I have Satellite P200 and the two modes are available. I have model laptop but can not imagine that the AMERICAN models, or models even Canadian work on a different path and BIOS must be the same.

    Toshiba service best place where you should ask for help. Call them and ask for explanations. If you are right and the AHCI mode is unavailable, they know why.
    Over the past 3 years I have worked with 4 different laptop models and all have absolutely identical SATA settings.

  • Why the things that are positioned correctly in design mode inexplicably don't change not when I go to preview?

    Why do things that is positioned correctly (at least I think they are) in design mode, inexplicably spend when I go into preview mode in Muse?

    Make sure that the stray item is not pinned.

  • Why the menu items change automatically?

    As I'm changed some stuff around on my test Business Catalyst site, I noticed that if I change the URL of a given page (I've changed the 'Shop' page to / sponsor), the menu item URL has not changed automatically. I don't even know the name of it has changed (I can understand as a 'function'). I thought it was a reason to use a CMS like this, that a lot of things like link exchange occur automatically. I'm sure other CMS like Drupal and Joomla do this automatically. There are chances that this will change in the future? Or maybe there is a reason why it's like that I forget?

    Thank you!

    Hi umiwangu,

    In my experience with BC as well as other systems, it is important to note that the pages and menu items are separated from each other.

    When a user creates a page it is not automatically added to a menu. Similarly, when a user changes the URL of a page that has been added to a menu, the menu item URL in question not is not updated automatically.

    So, if you changed a URL of the page that ends by "/ shop" to "/ sponsor ' you should be able to easily view this new URL in a browser. However, if you want the menu item that is linked to the old URL to reflect the new URL, then you will need to change the URL of item of the menu so they can talk to each other in the future.

    Yes, it's an extra step (crucial) update your menu items, but (in my experience) URL decisions are not something that is changed frequently - especially when it comes to SEO.

    In any case, I hope it helps! -Alex

    PS - If you haven't already, you can check zero to hero of gurus of the BC. They put together a huge set of training Sessions of BC (FREE) that are amazing!

  • Why the my boookmarks are invisible?

    Context menus, when I click on file, editing, history, bookmarks etc. are invisible, you can see a preview of the menu but nothing in it, same thing with appears right-click on shortcut menus, sometimes they will blink between visible and invisible, but 90% of the time, they are just invisible. I can always click on selections or bookmarks, but I have to guess where they are.

    Try disabling hardware acceleration in Firefox.

  • Help - why the songs that are not on my iPhone appearing in my list of app music albums/songs?

    I have over 500 GB of music on my Mac, so I create a playlist for the songs I want to sync my iPhone. Yet when I look at my phone, there are many songs that are not in sync would be playlist. They cannot be read unless the phone is connected to my wifi at home, but I don't want them cluttering up my phone and makes it almost impossible to find the tracks I want to listen to.

    I hate the new music app. For the first time since I converted to Apple 10 years ago, I wonder if I can be forced away because it's so horrible. Why ruin a great product with terrible software? Anyway, if anyone can help me to fix this serious bug, I would be very grateful.

    If you go to the library of the screen and press the red text just below the icons of the album/playlist (where you select whether you want the screen to show the view of the artist/Album/songs downstairs there is a toggle to only show that downloaded music.) If you enable this, then only the songs that are actually ON your iPhone will be in BLACK characters. The rest of your music library to iCloud either won't display at all or be grey. Now - if you have a few streaming, you can see more songs, because the songs that are heard are cached in the memory of the iPhone box and supposedly deleted automatically when it fills up (but not user accessible unless you use some third-party programs).

    What you can do - so they need WiFi or data cell-, it's make a playlist in iTunes that you want on your iPhone. Then (assuming that Apple music and iCloud music library are running on both), you can go to the playlist and press the small cloud/down arrow icon and download these tracks on your iPhone. Then, you can play these songs without access to wifi or cell phone.

  • Why the block diagram is disabled?

    What do I do now?  Please, look at the attached picture.  A VI that I use as a Subvi in various different programs suddenly started looking like I had used the application builder to create an exe out of it (but I don't have!).  The only options are Start and run continuously, and the block diagram is disabled.  What I did to get into this mess?  How to cancel everything that I did, so I can edit the schema-block again?  For any help or suggestion would be greatly appreciated.

    Thank you!

    You have somehow managed to record without a block.

    Go back to the last working back up and start from there.  You have backups, right?

    Lynn

Maybe you are looking for

  • Lenovo P770 does not start [brick]

    I'll start with a statement: I'm not a smart man.To try to get the GPS and compass works on my Lenovo P770 (S121), I managed to successfully brick it. I can still push files to the phone via USB, but I don't have the recalcitrant files for it. In fac

  • Boolean reset alarm reset in LabVIEW 2009

    Hi all, bit of a newbie here. My goal is to read a set of virtual devices, when "moved" it starts a timer alarm sequence and if the "reset" is struck in time the alarm go off. I think I have to top that, where I am a little confused is how to reset a

  • My Compaq laptop just turns off

    I have an old Compaq laptop of 2 years with an AMD Athlon x 2 chip.  I just added RAM (from 2 GB to 3 GB). Simply, it turns off after a while when I do intense things like games and disk imaging. It does not freeze, it just SE releases. I think that

  • No to olle sonido

    No to escucha el sonido of output

  • Large files in Illustrator

    HelloSometimes, I have a project that ends up being 2gig. I understand that it is probably the size photos that I'm setting but can I somehow make it work with more photos that I don't know how to reduce the photos without losing quality.Kind regards