Enable or disable menu items

I'm trying to disable the menu items in the menu bar. In the past, I used this code and it doesn't work:
var point = MyMenuBar.getMenuAt (0);
Item.setMenuItemEnabled (Item.getMenuItemAt (2), false);

I have now this code... but the menuItem is not a State of setMenuItemEnabled...
var menuItem:Menu = MyMenuBar.getMenuAt (posMenuBar);

No idea how to configure it to disabled

Thanks a bunch... Here's what I did... I made a function:

private void enableSubMenuItem (posMenuBar:int, posSubItem:int, bool:Boolean): void {}
var menu: XML = XML (MyMenuBarDP.getItemAt (posMenuBar));
menu. Node[posSubItem].@enabled = bool;
}

and then used these lines of code:
enableSubMenuItem (0, 0, true);
or
enableSubMenuItem (0, 0, false);

in this way, you can enable or disable items throughout the structure of the menu bar you...

I took the XMLListCollection my menu bar used and converted to XML and then used E4x to access the enable attribute... Talk about a headache :)

How you found that "activate" is an attribute of the XML object?

Tags: Flex

Similar Questions

  • Enable and disable the item based on the Condition

    Hi Experts,

    I work in the form of 10g, I conditionally.

    I have the block master detail.

    Master block contains sub elements.

    CUSTOMER

    Address (read only) - no database element

    PRODUCT GROUP (read only) - no database article

    Note: The CUSTOMER is LOV, when I select the customers, I'm failing address and product group.

    Block detail contains sub elements.

    DATE OF START OF BLOCK

    DATE OF END OF BLOCK

    REASON

    Note: when I opened form all fields of retail blocks are enabled

    Requirement:

    1. when I created new record, at the time where I select the customer name, Bill and product group will be by default, in the block of detail - I want to activate and deactivate the block start date based on the value of the product group.

    2 if I erase block master, I need to activate the block_start_date like back when the new form is opened

    3. when I search the data also, block start date must be enabled and disabled based on the value of the product group.

    Could someone help me the best approach to achieve so that she will have no side effects.

    Thank you

    801619 wrote:

    Hello

    Thank you for your response... I have tried code trigger after change of category of products below.

    If: blockname.product_group = "Aviation" then

    set_item_property ('block.block_start_date', enabled, property_false);

    On the other

    set_item_property ('block.block_start_date', enabled, property_true);

    end if;

    1. it is disable the Group field when I put the cursor inside if the product category is "Aviation", but I want it to be automatic at a time where it will default to the value of product category.

    2. If the master clear record, is not allowing return product group

    3 suppose that if enter new record category of products "Aviation", once I put the cursor inside, it's debilitating, let's say if I erase the main recording without saving the changes, it not again allows the Group of products, it is now status (disable) previous.

    4. in query mode, it is not disabling or enabling from a group of products.

    Help, please.

    Thank you

    Ok.

    1. put your code on this trigger after changing point that fills the default value in the product category.

    2. remove the trigger after change of product group.

    3 put the same code to trigger once - new - Record - Instance of the main block.

    Hope this helps

    Hamid

  • Disable the Menu item

    Greedings,

    Lets give an example of a menu bar we have main menu-> article

    to disable an element we use
    set_Menu_Item_Property ('MENU.item', Enabled, PROPERTY_OFF);

    How can we disable the good root?

    Thank you

    Lets give an example of a menu bar we have menu root-> point
    How can we disable the good root?

    If you want to disable the menu root, just set the menu property visible on No.

    Hope this will help you.

    If someone useful or appropriate, please mark accordingly.

  • How to disable contextual right click menu items.

    Hello

    I am disable some menu items when opening my pdf application.  However, the same menu items are enabled in right click menu popup pop up anywhere in the document.  Can someone let me know how to disable the specific menu items in the right click menu? Also, is there is it possible to disable the whole right click menu shit back in my Pdf?

    Yes, if you know the names of the menus AND they are beyond the real "arise", then you can indeed use them the same way.

  • Use (menu)-> Run (menu item) disabled

    I'm trying to change the main VI of a project that I didn't create.

    I can build the EXE of the Project Explorer.  However, I can't directly launch the VI.  Operation (menu)-> Run (menu item) is disabled.  Also, switching between normal operating mode and the "Edit" mode does not have the option menu to run.

    How can I run the VI from LabVIEW?

    Note: The VI has no errors.

    In the properties for VI, someone turned off the run button. Open the properties of the VI, then select the appearance of the window category. Click on details. Check the box that says "Show Run button".

  • Disable the menu item in the third party application (such as Photoshop)

    Please suggest me to disable the menu item in the third party application (such as Photoshop).

    Hello

    I suggest you to send your query to the following link:

    Photoshop Help Center: http://www.adobe.com/support/photoshop/

    Hope this information is useful.

  • How can I disable the menu items using manu, Photoshop cs6?

    How can I disable the menu items using manu, Photoshop cs6?

    I packed Photoshop cs6 using AAMEE CS6.

    I need some menu items to disable.

    can someone please process to do, or what records or files need to edit.

    Enjoy the immediate response.

    Thanks in advance.

    There is another discussion on the same topic: http://forums.adobe.com/thread/1234967?tstart=0

    Perhaps the same company has contracted two of your companies

  • 'Settings' menu item disabled - why?

    I have a flash application that makes an audio recording via our fms server on influxis.com. then I do the usual stuff like trying to open a microphone etc. when the charges first app, it tries to find a microphone, but the library says microphone the microphone is muted. also, when I right click on the application, the menu item "Settings"... "is disabled. Why? normally, the user can select a microphone to use through this dialog box. the only way to make it work, it is to open another application that performs video recording, right-click, select 'Settings' (not disabled for this app!) and then set the microphone settings.

    My big question is why the "settings" menu item is disabled for my application?

    any help greatly appreciated

    BHU

    Hi bhu,.

    I was also curious about it so I asked around.  It seems that there is a minimum requirement of width and height for the parameters dialog box to activate.  Try to set the width of your swf > = 215px and height > = 138px.

    Thank you

    Chris

  • Disable or remove the menu item 'Print the Pages' in reader

    Hello

    I would like to delete (or disable) the menu item print Pages in adobe reader

    See the attachment for the location of the menu item

    Thank you

    Mike

    Is not possible.

  • How to disable the browser menu items?

    IM using the browser session to display images, but its menu has many elements that I don't need. Is there a way to remove these menu items in the menu of the browser?

    BrowserSession b = Browser.getDefaultSession();
    b.displayPage("file:///" + filePath);
    

    There is unfortunately no way to remove items from menu standard browser.

    There is a way to add additional menu items, but there is no way to delete those that already exist.

  • No. phones menu item smart blackBerry to enable the services of the company?

    Hello... I got my storm configuration to get work through OWA email after I got it, then we have upgraded our Exchange Server and now it requires the Services of company activated for the work given to my BB email.  When I go to Options/Advanced Options there is no menu item for "Enterprise Activation".  A colleague who has a storm showed me his Advanced Options menu and it's there.  Clues as to why I have this option or how you install?

    Thanks for any help, that all the world can offer.

    Hmm, I'm not even on a system of BES and I always show option in Advanced Options.  My suggestion is to just try to pull the battery of your phone for ~ 15 seconds and put the battery back in.  If it does not, see your BES administrator or contact your carrier for assistance.

    Start here and if this does not work, let us know and it has other suggestions, we should be able to provide.

  • Optional features of Windows cannot be enabled or disabled, hidden Windows updates cannot be uninstalled

    (!) Refer to this post: Windows Media Player enabled at startup interferes with sound, video, and other sources

    Obviously the Vista Home Basic SP-2 (optional) Windows features is more damaged than expected? None of these options has tried several times using different techniques can be enabled or disabled. I also had similar problems with uninstall some windows (and hidden) updates so I can reinstall them (including Service Pack 2: Windows6. 0-KB948465 - X 86) and 'can' be related.

    After the attempt to turn an optional feature on or off (to speed up Vista, is not necessary, or is necessary), in this case: "an error has occurred, not all features have been changed successfully." And it takes an unusually long time before it fails too? If I try to uninstall a Windows or hidden, in this case update: "an error has occurred. Not all updates have been correctly uninstalled"; but others were like "Silverlight" etc. If I try to reinstall Vista 5 languages SP-2 KB948465 Installer, I get: "the requested operation failed. A system restart is needed to roll back changes"ERROR_FAIL_REBOOT_REQUIRED (80070bc9).

    Even Windows updates failed to install Powershell 2.0, WinMF 2.0, and BITS 4.0 (read the post via the link above for more information). And if I do various attempts to troubleshoot and resolve these issues (and so on), the Blue error screen occurs finally.

    Other misc registry errors found; but were obsolete or left behind from the previous uninstall (not critical). Even in SafeMode with networking, all bet three errors have occurred (with startups and the services that are disabled; Microsoft services were 'hidden').

    The link in the installation of Service Pack 2 window (for more information on this specific error) goes to a Microsoft Support web page that explains this problem exactly as regards to SP - 2 mainly; Article: http://support.microsoft.com/kb/947366. But none of the solutions work or are applicable, since the system restore could not go back enough and I have not a Vista Home Basic CD (it is a second hand laptop that I will eventually replace it with another that has Windows 7, etc.). More Vista Service Pack 1 is already 'not supported' and SP-2 will soon follow. There is therefore no need to buy a CD to launch the "startup repair tool" (via another case).

    * Ironically the laptop works well overall, but some programs such as TVCenter6 are not able to function normally (DirectX. Net3 etc work fine) and require some resources that do not work due to the above problems. I can get on the internet using Internet Explorer 9 very well also (although Silverlight and Powershell etc. are required for certain functions to display or work).

    Please advise, Chris.

    Updated, I have invested in PC Health Advisor to 'fix' the registry problems; I was not able to manually set Windows features, specifically. When the computer reboots, I ran Windows Update and it worked again! Such that it auto-updated dot- Net Frame 3.5 Service Pack 1 (made in first), Powershell 2, WinRM 2.0, and BITS 4.0 etc.. I was so happy that I reinstalled Silverlight to Explore maps of Bing etc and tried again the functionality of Windows; no avail.? And he discovered damaged the account administrator; including commissioning elements "right-click" menu etc. (reinstall Vista SP2 manually failed too; almost from the beginning).

    To restore, I implemented a new admin account, renamed the one damaged, disconnected, connected to the new one, tested and deleted the renamed account; It worked! To retry the Windows features, the Admin account was again damaged. so I repeated these steps to restore Vista and had to address admin custom etc all over again just through (what is called "Aero" is enabled, but did not prevent the performance. Aero does not officially come with Vista Home Basic but gets 'active' to upgrade to Internet Explorer 9!).

    But in no way does this solve the problem base with features of Windows? I am amazed at how fast and responsive H.B. Vista Service Pack 2 is overall using less system resources; Despite this heart problem? And took a snapshot of what Windows Update installed completely. Fixed given by the support of third parties as a result of PC Health Advisor of the PC maintenance utilities (made by ParetoLogic I recommend instead if this ), has no also. And was not different from what I had already exhausted; stretching on the days. What I can possibly be "gone" which is at the root of the problem "of the Windows features" (as an option)?

    Update: I restarted PC Health Advisor several times: found and fixed more various defects of registry; found five obsolescent hardware device drivers (downloaded and installed updates for modem integrated, Realtek sound, "Value Added package" mass USB, Atheros wireless (WiFi); due storage manually remove the registry key for Toshiba VAP not in Control Panel?; restarted the laptop, did the account Admin is again ruined?) (in the same way; but not "Windows features" this time) And has been replaced with 'test' admin account for now. Revived the PCHA once again, found several flaws of registry; restarted; revived the PCHA (lack of only 1 minor registry this time and fixed), everything tested OK. Hard drive defragmented PCHA, put in place a third replacement admin account while remaining connected to test admin (deactivation and reactivation recent items starting reset not his "right click" menu). Running of new PCHA carefully before logging in a third new account Admin (health high, not mistakes; was then low mid level), connected off test, connected to the third replacement Admin account; realized that Windows Process Activation Service is not included in Vista Home Basic (SP-2). Windows Installer module did not work and can not be started; then I opened the Manager of tasks in administrator mode and managed to do the work. I downloaded the Vista CD torrent; but it requires a blank CD for this (and so on).

    Nothing has worked? The only solution found online so far is to reinstall Vista Home Basic Service Pack 2 edition, which is not possible (for the reasons). There must be a way to run a downloadable and OS utility repair record; When I discovered Reimage (point com) I peut buy as a last resort. If it does not reach the root of the problem and fix it, or if the Microsoft technical support cannot? I have no recourse but to buy another laptop (with OEM Windows 7 preinstalled; which is cheaper on this Toshiba Satellite A135-S2276 level).

    If I find anything else I will update this post (still pending from Microsoft to answer this question and other positions).

    Here are the latest steps taken to solve this problem that many there have also, as follows:

    (!) If you want to try this yourself, omit all deletes registry keys tried except «VistaSP2...» (for a total of 5 to 7 keys).

    (*) I kept those strictly for FYI purposes, while one who is also having this problem may avoid in go through what I had.

    (*) If I had known 'VistaSP2-... (KB948465) "is the correct name for the key (s) Service Pack 2, I could avoid all others.

    A ran the other (3rd party) utilities and other tasks, admin account is damaged is no longer; but root question remains?

    Tried to install standalone 5 new SP-2 languages. but not with the same "error in registry" repeatedly?

    Removed 50 updates beginning with the top of the list of MSW that Vista is back (all), because of the error in config.

    About 9 keys starting at the bottom this time and worked until I got to this key, that I could not remove the abduction:

    Update for Windows KB949939 did not have an uninstall option and may not be removed in high regedit.

    Changed permisions them key to 'force' a delete (changed owner, granted full control to the 'administrators').

    Removed other keys at the bottom of the install MSW list but standalone SP2 has not yet (in the same way).

    Found another potentially corrupt key with no. Uninstall KB938371. a 100 + instances of it and were withdrawn.

    Find more cases of this key (/ multilingual country) and changed "permissions" to remove all.

    A ran a search of all keys to make sure that all were completely removed from all categories; in the record high.

    Continued with the uninstallation of updates of DSM of the last upward; revived after all the few (which prompted the it).

    But still, the standalone Vista SP2 installer has failed in exactly in the same way? (following the removal of updates).

    Found and removed three updates DSM more with no uninstall option: KB937287, KB955430, Windows Search (4.0).

    The second key was part of the first? Removed a little past these, restarted, SP-2 (run as Admin) has always failed.

    High Ran regedit in mode 'permissions' to delete the keys to potential RETICLE; Search 4 uninstall appears!

    Deleted 4 research and restarted Installer but SP - 2 has not yet? Uninstalled four updates more in the list.

    The following entry is Service Pack for Microsoft Windows (KB948465), but he is damaged and cannot be uninstalled?

    This must be the problem, given that some of the deleted key had to do with "iCBS; has run high regedit.

    Used exactly the same procedure to manually remove the keys to Vista SP2 with care; but there were too many entries!

    Revisiting previous research, I realized that these keys starting with "VistaSP2 -" can be deleted. It worked!

    Service Pack for Microsoft Windows (KB948465) was finally removed from the list of updates installed after discount!

    Removal of two more MSw update to make sure it not more corrupt Scriptures; the Service Pack 2 Setup program has gotten away.

    But it suddenly abandoned shortly after the file copy process has started with the same error of registry; restarted.

    It worked! Everything was great when a system error suddenly interrupted the installation but 0x80070bc9 error has disappeared!

    The Setup dialog window prompted "0x800f081f' with more information on the Microsoft web site.

    Again running the preparation tool for the system Vista (Home Basic SP-2) update to fix "missing component CBS.

    Run the Vista SP2 installation program again, process installs other Microsoft Updates; but everything stops in the same middle point?

    Reran the tool again, rebooted, re-run Setup of Service Pack 2, same event occurs: error system 0x800f081f.

    CheckSUR log file lists 10 (f) CBS Watchlist missing package and 441 (f) CSI lack of deployment total key.

    According to the research done on this error, the only 'solution' again is to reinstall Vista Home Basic SP - 2 ed?

    And the two service items Microsoft Office Service Pack 2 Setup, I had already tried with the initial error.

    The irony is that the laptop works better than ever, but specific programs such as TVCenter6 will not work?

    Made of in-depth research on the error "0x800f081f" etc. (occurs with SP1 install also FYI); run the tool again.

    Remains found components for Vista SP1 not in the list of updates installed therefore some errors checkDUR.

    Used the same technique above to remove "VistaSP1-KB936330 ~ 31bf3856ad364e35 ~ x 86 ~ ~ 6.0.1.18000; iCBS but left.

    Again running PC Health Advisor, this time in high fashion, analyzed twice, found 14 registry errors and fix them.

    Who finally authorized the second error to install SP - 2. ("0x800f081f"); but still, Vista SP-2 does not go to reinstall?

    A run PC Health Advisor; found No registry errors either. If the Admin account is stilldamaged .

    I'll keep this account as it is until what I hope to be the final solution be found; and implement a new Admin then.

    Curiously, now it almost immediately invites "SP1 must be installed first" and is a sine qua non for SP - 2.

    As with Service Pack 2, SP 5 languages-1 has been downloaded; SP - x causes complete multilingual features to win at "overpoll".

    Service Pack 1 abandoned installation (already installed); ran high regedit and delete all sets of keys KB936330 (about 50).

    SP - 1 still wouldn't reinstall; used high regedit to remove the many KB936330 key sets and subs as possible.

    But Vista SP - x abandoned always with the same alert. only to discover 'integrated Service Pack 1 cannot be uninstalled?'

    Never after deletion so mamy keys manually, SP-2 (and SP1) was still as installed; in the box of Winver.

    After keys deleting both remaining SP - x, I realized it was unnecessary; and others deleted inadvertently.

    All this could not uninstall Vista Service Pack 2 (SP-1) to be (re-) installed to fix the underlying problem.

    After reviewing tried everything so far to see what can be done; I ran the uninstall of the elevated command line.

    But the result is the same; the prompt returned in a few minutes, but SP - x via GUI can take more than an hour?

    Conclusion: after finally getting the method calls BACK to (re) - install Service Pack 1 to work, it failed at the end!

    "Mode and on the process in an automated"undo"install", records were destroyed during the restart.

    Apparently, this version of Vista Home Basic was integrated (installable)? SP-1 and requires the CD (OS)!

    If I had known this all along, I would have improved (at least) to Ultimate. Which is exactly what the person I gave

    the laptop used far have done without any problem (less a video cable that fell off under the keyboard).

    How Microsoft can come up with such a version (SP - x) for (laptops), this are not equipped with CD?

    Because without it, there is no way to fix problems like this an 'off' (via Windows Upgrade also) internet.

    This case is classified as insoluble with regard to the original question.

    Hello

    wrong forum

    It comes to the installation of vista operating system instance

    try to repair:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-system?page=1&tab=all

    or windows update:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_update?page=1&tab=all

  • How to hide the Menu item in the Oracle Forms Menu bar.

    Hi all

    I have a requriement wherein I have to hide these oracle forms menu bar menu items whose rights are not available with the user.

    I already have enable / disable the option on the order of the day, but required to not display these items that are users do not allow access to users.

    Is it possible to do this task? Please help and guide me.

    Thank you

    Atif Zafar

    Perhaps a typing mistake?

    Your menu is named MAIN_MENU_MENU, in your code, you use only MAIN_MENU.

  • In history more, many of my menu items are unavailable. Why?

    I am a member of the CC and history says 'Adobe Story PLUS' at the top. However, when I'm in the view creation and look in the file, editing, display, review, Production and add menus, many of these menu items are dimmed (unavailable). So, I can not add scenes, etc. For example,.

    • Under Edit, I can not change a model, list of characters, the character to validate names, list, post names, list of bookmarks, labels to validate, Set list elements of tag, validate elements of tags, jumping, etc.
    • By virtue of the notice only is automatically turned off full, I can not display numbers, duration of the scene, camera, sound elements, etc.
    • The study, no option is available. None. Zero. Nada. Big goose egg.
    • Under Production, the ONLY things I can do is remove the title Page, and change the header footer. Yay
    • Under Add, the only element that is enabled is Image, so at least I can kind of Storyboard. Not that I can arrange what in a table of Storyboard, but at least it will look like I tried. Customers love it, you know...

    Which means that Story more is basically useless for me. I also use MS Word. How can I activate these options and get Adobe Story as a useful program?

    EDIT.
    Another thing I just noticed is that I can't add shots more that 3 story gives me first. This will be a very short script... Adobe is serious about this program of 'scripting' POS? What a joke.

    Some history features only work with certain types of scripts.

    for example features like Set/lists/actor, model, track changes, revisions etc Production work with film and TV scripts only.

    In the 'Add' menu are AV scripts

    Therefore, these menu items appear disabled in other documents.

    In a Script of several columns, you can add more than 3 lines by clicking the Add icon.

  • Definition programmatically the menu item & quot; permit & quot;.

    I have a soft LOOK that offers a menu point which, when selected launches a dialog box.

    I need set the enabled property of the item of menu false after it is selected, that only one instance of this dialog box is expected to be launched, and I don't want to make the modal dialog box. I also need to set the property enabled to true when the dialog box is closed.

    I do this through the defaultDataDescriptor?

    BTW, the dialog box that starts is not a popup, it's in an AIR application in the main window, in what I call the 'activities '.

    I don't know if that's how I had to do, but I create an associative array object and when I disable a menu item in the ItemClick event (if it is a menu item that needs to be deactivated at the time), I store a reference to the menu item in the object. Then when I close the dialog box I have uses the reference to re - activate the menu item.

Maybe you are looking for