Creating a sub menu
Hey. I didnt get a reply before, so I thought I would try a fresh post so I can explain things better.
Basically, I have a navigation bar with several buttons. When a button is pressed, a new sub navigation should be displayed in a different location. So on my main nav, I have mouse events, and on the click event, each button points to an xml file
function mouseClickEvent3(eve:MouseEvent):void
setLoader("XML/path.xml");
the setLoader method is
function setLoader(xmlPath:String):void{
loader.addEventListener(Event.COMPLETE, xmlLoaded);
loader.load(new URLRequest(xmlPath));
And on complete, it calls up xmlLoaded which holds
if ((e.target as URLLoader) != null )
settingsXML = new XML(loader.data);
settingsXML.ignoreWhitespace = true;
createMenu();
The createMenu method is where the menus are created.
function createMenu():void
var menuItem:MenuItem;
var i:uint = 0;
for each (var link:XML in settingsXML.links.link)
menuItem = new MenuItem();
menuItem.menuLabel.text = link. @ name;
addChild(menuItem);
i++;
Now all the menus get created no problem. The problem is this. One main button produces a sub menu with six buttons, which are displayed no problem. I then click on another main button which has 3 sub buttons. These 3 buttons replace the 3 buttons that the first button displayed, but the last three are not removed. Sometimes, only two buttons seem to get replaced.
What I really need to do is this. Before any buttons are created, I need to somehow remove any buttons which currently exist. I have tried things like this before the for each loop
for (var y:Number=0; y<i; y++){
removeChild(menuItem);
Nothing seems to work though. So any suggestions on how I can overcome this issue would be great.
cheers
Kool. trying to follow your suggestion. So I have created an Array outside of the function so it doesnt get recreated each time. Then before I do
addChild(menuItem);
I have
ary.push(menuItem);
The problem is that I cant see how this Array can help to remove items. Before the for each loop, I have tried something like this without success
for(var j:Number=0; j<ary.length; j++){
removeChild(menuItem);
If I do a trace on the arrays length outside the for each loop however, it is always 0 which will be the reason the child isnt removed. At the moment, I have it like this
var ary:Array = new Array();
function createMenu():void
var menuItem:MenuItem;
var i:uint = 0;
trace(ary.length); //shows 0 every time
for(var j:Number=0; j<ary.length; j++){
removeChild(menuItem);
for each (var link:XML in settingsXML.links.link)
menuItem = new MenuItem();
menuItem.menuLabel.text = link. @ name;
ary.push(menuItem);
trace(ary.length); //shows correct length
addChild(menuItem);
i++;
My original thinking was that in English, for each menuItem that is on the stage to be removed, before new ones are created. Its like I need a reset function which will completely remove any children which are displayed. The problem is, If I create a for each loop, I am not sure what my arguement would be.
Any further advise always appreciated.
Cheers
Similar Messages
-
How to create a sub menu for the transaction se38
Hi All,
I have created menu item in se38 using menu exit.
By using the enhancement SEU00002 .
That menu item is displayed under utilities menu bar.
But i am unable to create sub menu for that.
My requirement is to create sub menu to the custom menu item.
How can we create a sub menu to the transaction se38.Hi,
it looks like that user exit SEU00002 offers only one extra function +CUS. This function then calls FM EXIT_SAPMS38E_010. Hence I do not think that it is possible to create sub menu with this user exit.
Anyway you can try to modify SAP standard. You need to modify menu for SE38 and then add your code for handling new function codes. You can easily find where you will have to add your code for handling functions from your sub menu. You just need to look for usages of the FM EXIT_SAPMS38E_010.
Cheers -
How to create a Sub Menu?
I know it can be done. But just can't find how to do a
submenu that shows when you roll the mouse on main menu, and hides
if your mouse is anywhere else. I can imagine that I can create the
sub-menu with a movie clip symbol containing each command or choice
as a button. But waht I don't know it how to keep it hidden and to
make it only shown when you point the main menu that should
activate ths sub menu.
Thanks for your helpYou can use click events on the main menu to trigger the
submenus and then use rollOver events to know which submenu to show
and which to make invisible. -
Create new sub-menu item....how???
Hi,
I have a site created with Dreamweaver templates.
I can create a new page from a template but i want to make
the page a sub-menu page.
For instance i have an 'about us' page and from this 'about
us' page i want to create a sub page. None os these areas have been
locked but i can't find a way to do it.
Is it possible?
am i missing something?
Any tutorials anywhere?
Thanks for any help
JYou'll probably want to make any menu changes (since the menu
may be an element that is present on all your pages...hence the use
of a template) in the non-editable regions in Dreamweaver, then
uploade the template and do a template update in Contribute
(Edit-->Format-->Template
Properties-->Apply-->OK-->Publish).
As a rule, your menu/navigation should be laid out in the
template prior to using the template to create new pages (not
exactly sure what you mean by "sub pages"). In other words, your
template navigation/menu determines the main navigation you want
available on EVERY page you create with the template. If you then
create a new page in Contribute using the template, you're free to
create links (in the editable regions) to any page you want
(existing or new), including pages that are already linked-to in
the menu.
Hope this helps! -
Creating sub menu's under Abstract Action.
Folks,
I am trying to create a sub-menu under abstract actions.
But when I run the application,I can only see 'Create New Positions' menu item;
and cannot view/invoke the sub menu options(ie Create Position One/Two).
Is there a way to create sub menu's under the main action menu? (in the code below please)
Thanks,
final ArrayList<Action> actions = new ArrayList<Action>();
actions.add(new AbstractAction("Create New Positions") {
public void actionPerformed(ActionEvent e) {
// Sub Menu options
actions.add(new AbstractAction("Create Position One") {
@Override
public void actionPerformed(ActionEvent e) {
// Code to create position one
public void actionPerformed(ActionEvent e) {
// Sub Menu options
actions.add(new AbstractAction("Create Position Two") {
@Override
public void actionPerformed(ActionEvent e) {
// Code to create position two
});Hi Thomas.behr
I tried as you suggested :
final ArrayList<Action> actions = new ArrayList<Action>();
actions.add(new AbstractAction("Position Creation..."){
public void actionPerformed(ActionEvent e) {
JMenu PositionMenu = new JMenu(new AbstractAction("Create Position one"){
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
// actions.add( PositionMenu).... as action expects an Action
{code} -
Reg: Creating sub menu for a concurrent program under menu on the Menu bar
Hi all,
I would like to know, how we can create a sub menu for a conc. program under a sub menu on the Menu Bar ?
Thanks In Advance.
Regards,
NeetiIt is a 2 step process. First, enable a new menu entry, which when called will fire a user-named trigger, where the call to the concurrent programs form is the executed. How to do it depends on the release. Previous to 11.5.10, this has to be done trough custom.pll, and 11i10 an r12 with forms personalization. Documentation and examples exists for both cases, have a look on metalink.
-
How to include in the sub-menu a table specifies of the user - UDO
hi, forum
how to include in the sub-menu a table specifies of the user
I created a table '@ IA_RELAT' in User-Defined Obejcts but I don't know as including in the sub-menu that I created
it follows my code
Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
If (pVal.MenuUID = "MySubMenu") And (pVal.BeforeAction = False) Then
Try
<u201DmyTableName->@IA_RELATu201D>
Catch
SBO_Application.MessageBox("The Form already exists")
End Try
End If
thank you
End SubHi David
Excuse me but I didn't find in MenuCreationParams Objects how to do this call of the table '@ IA_RELAT' created in User-Defined Obejcts
It follows my code
in AddMenuItems I set up the Menu and Submenu
in SBO_Application_MenuEvent it is where I am having difficulties of showing the table '@ IA_RELAT' created in User-Defined Obejcts
Thank you for any help
Private Sub AddMenuItems()
Dim oCreationPackage As SAPbouiCOM.MenuCreationParams
oCreationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)
oMenuItem = SBO_Application.Menus.Item("43520") 'moudles'
Dim sPath As String
sPath = Application.StartupPath
sPath = sPath.Remove(sPath.Length - 3, 3)
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP
oCreationPackage.UniqueID = "MyMenu01"
oCreationPackage.String = "Standard cost"
oCreationPackage.Enabled = True
oCreationPackage.Image = sPath & "UI.bmp"
oCreationPackage.Position = 15
oMenus = oMenuItem.SubMenus
Try ' If the manu already exists this code will fail
oMenus.AddEx(oCreationPackage)
'// Get the menu collection of the newly added pop-up item
oMenuItem = SBO_Application.Menus.Item("MyMenu01")
oMenus = oMenuItem.SubMenus
'// Create s sub menu
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
oCreationPackage.UniqueID = "MySubMenu"
oCreationPackage.String = "Auxiliary Table"
oMenus.AddEx(oCreationPackage)
Catch er As Exception ' Menu already exists
SBO_Application.MessageBox("Menu Already Exists")
End Try
End Sub
Private Sub SBO_Application_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.MenuEvent
If (pVal.MenuUID = "MySubMenu") And (pVal.BeforeAction = False) Then
Try
SBO_Application.ActivateMenuItem(menus.Item(1).UID.IndexOf("@IA_RELAT"))
Catch
SBO_Application.MessageBox("error")
End Try
End If
End Sub -
I want to create menus in nested order i.e.
Customized Reports
....Financials
........Bank Book
Outgoing Payment Receipt
I am able to create Customized Reports and Financials.But I am not able to add Bank Book and Outgoing Payment Receipt under Financials.For creating the above menus I have referred the code from sample examples given by sdk.The code is as,
oMenuItem = SBO_Application.Menus.Item("MyMenu022")
oMenus = oMenuItem.SubMenus
'// Create s sub menu
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
oCreationPackage.UniqueID = "Financials"
oCreationPackage.String = "Financials"
oMenus.AddEx(oCreationPackage)
'// Create s sub menu
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
oCreationPackage.UniqueID = "MySubMenu028"
oCreationPackage.String = "Edit Item"
oMenus.AddEx(oCreationPackage)see this u get idea--
Sub AddMenuItems()
Dim MenuImage As String
Dim cmdCenterForm As SAPbouiCOM.Form
cmdCenterForm = SBO_Application.Forms.GetFormByTypeAndCount(169, 1)
If cmdCenterForm Is Nothing Then
Return
End If
'freeze the command center (faster and no flickering)
cmdCenterForm.Freeze(True)
Try
'Menu ID Range to be used is M_000131 - M_000150
'Form ID Range to be used is 2000050151 - 5000050170
oCreationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams)
oMenuItem = SBO_Application.Menus.Item("43520") ' Module Menu
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP
oCreationPackage.UniqueID = "M_000131"
oCreationPackage.String = "Exports"
oCreationPackage.Enabled = True
oCreationPackage.Position = 14
MenuImage = System.Windows.Forms.Application.StartupPath + "\Images\Imports.bmp"
oCreationPackage.Image = MenuImage
oMenus = oMenuItem.SubMenus
Try
oMenus.AddEx(oCreationPackage)
Catch ex As Exception
End Try
' Incentives
oMenuItem = SBO_Application.Menus.Item("M_000131") ' Exports
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP
oCreationPackage.UniqueID = "M_000141"
oCreationPackage.String = "Incentives"
oCreationPackage.Enabled = True
oCreationPackage.Position = 0
oMenus = oMenuItem.SubMenus
Try
oMenus.AddEx(oCreationPackage)
Catch ex As Exception
End Try
''''''' 'sub menu for Incentives
AddMenuItem1("M_000142", "Free Trade Zones")
AddMenuItem1("M_000143", "Export Oriented Units (EOU")
AddMenuItem1("M_000144", "DEEC")
AddMenuItem1("M_000145", "EPCG")
AddMenuItem1("M_000146", "Deemed Exports")
AddMenuItem1("M_000147", "Duty Drawback")
AddMenuItem1("M_000148", "PPV Report")
' Master
oMenuItem = SBO_Application.Menus.Item("M_000131") ' Exports
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_POPUP
oCreationPackage.UniqueID = "M_000161"
oCreationPackage.String = "Master"
oCreationPackage.Enabled = True
oCreationPackage.Position = 0
oMenus = oMenuItem.SubMenus
Try
oMenus.AddEx(oCreationPackage)
Catch ex As Exception
End Try
'sub menu for master
AddMenuItem1("M_000162", "Shipping Bill")
AddMenuItem1("M_000163", "Customs Declaration Form")
AddMenuItem1("M_000164", "Commercial invoice")
AddMenuItem1("M_000165", "Customs Invoice")
AddMenuItem1("M_000166", "Certified Invoice")
AddMenuItem1("M_000167", "Packing List")
AddMenuItem1("M_000168", "Certificate of Shipment")
AddMenuItem1("M_000169", "Health/ Veterinary/ Sanitary Certification")
AddMenuItem1("M_000170", "Shipping Order ")
AddMenuItem1("M_000171", "Short Shipment Form")
AddMenuItem1("M_000172", "Packing List")
Catch ex As Exception
End Try
cmdCenterForm.Freeze(False)
cmdCenterForm.Update()
End Sub
Sub AddMenuItem1(ByVal MenuID As String, ByVal MenuName As String)
Try
If MenuID = "M_000142" Or MenuID = "M_000143" Or MenuID = "M_000144" Or MenuID = "M_000145" Or MenuID = "M_000146" Or MenuID = "M_000147" Or MenuID = "M_000148" Then
oMenuItem = SBO_Application.Menus.Item("M_000141")
ElseIf MenuID = "M_000162" Or MenuID = "M_000163" Or MenuID = "M_000164" Or MenuID = "M_000165" Or MenuID = "M_000166" Or MenuID = "M_000167" Or MenuID = "M_000168" Or MenuID = "M_000169" Or MenuID = "M_000170" Or MenuID = "M_000171" Or MenuID = "M_000172" Then
oMenuItem = SBO_Application.Menus.Item("M_000161")
Else
oMenuItem = SBO_Application.Menus.Item("M_000131")
End If
oMenus = oMenuItem.SubMenus
oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING
oCreationPackage.UniqueID = MenuID
oCreationPackage.String = MenuName
oMenus.AddEx(oCreationPackage)
Catch ex As Exception
End Try
End Sub -
Hi Experts,
I am using NW 7.3.
Is there an option to create a sub menu for ButtonChoice control ?
For example:
When i click on my ButtonChoice control i get a menu with 3 entries: one. two and three
The "two" entry should be able to open a submenu .
Is it possible in WD Java?
Regards,
Slavik.Hi,
GO thru this document for more info on Buttonchoice:
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b06c8c9a-19a4-2b10-d985-9ae7a4383478
Button with menu options
Regards,
Poojith MV -
Include nested Inner Sub Menu in main menu
Master,
I have created one Main Menu and Sub Menu. But i want to add 3 inner sub menu.
I Need to display as shown in below.
<u> List</u>
File > Recent Files
> Deleted Files
> All Files
NOTE: Here <u><b>File</b></u> is Sub Menu and other 3 is Inner sun menu for <b><u>File</u></b>.Hi,
To create the submenu components, leave the function column empty, enter a submenu name, and double
click on the submenu text.
here is the perfect solution with smaple code
Re: How do I create a sub-menu item
Regards
Sudheer -
Sub-menu creation for Chapters
Hi,
I have made a film and I have added chapters to the film using the software SimpleMovieX. When I tried to add the film to an iDVD project the chapters of the film do know show in iDVD. Nor does iDVD automatically create a sub-menu for the chapters. I have ensured that the box is checked for 'chapter sub-menu'.
I was wondering if it something do with the fact I created the chapters with SimpleMovieX. I was wondering if I should re-save the movie through Quicktime or 'something'.
Thanks,
MartinWhere did you create this film? If in iMovie, you add chapter markers there. Ifd you export out of iMovie as a QuickTime Full Quality, it will remove the chapter markers. You have to Send to iDVD to preserve them, or drag the iMovie project file into a new iDVD project.
-
How to create a dropdown menu with sub buttons that link back to the labels on click.
im trying to create a dropdown menu buttons that when you rollover to the top central button the button it opens up like a drop down menu would containg two other subsectional buttons. This makes the sub sectional buttons seperate from the main stage making it difficult to simply give them a on click, sym.play("label") function.
the buttons work like this in symbols or sections stage/panel/homebutton inside home button is group dev containg another group dev containg the button which I need to link back to a "label" in the /panel/ symbol or section. Thank you very much.pdp_1 wrote:
Hi!
I would like to create a DVD menu that offers two languages. So the first page gives two options: Language 1 and Language 2. Then depending on which language you choose, you go to a menu that proposes different videos and a photo slideshow.
Regardless on which language button you click on initially, you get the same content but in different languages.
I've been looking at Premiere's templates, which I can certainly customize, but I really don't see how to create the double menu. Does anybody have an idea?
Put the video with the first language on the timeline followed by the video with the second language. Use chapter markers so you can have each video as a chapter in the menu.
I use Premiere Pro, so I can't give more specific directions. Perhaps somebody like ATR will chime in.
Also, I have another question: can I put videos from different projects in the same DVD with Premiere or must all of the videos that go into the DVD be in the same project?
Thank you very much!!!
pdp1
They must be in the same project. -
How to create a menu with pages linked as sub menu in ADF?
Hi Experts,
I'm new to ADF and trying to create a menu like below in ADF.
Actions Menu
|
|
Option 1 -- A page with some static text and links.
Option 2 - A different page with some static text and links.
Have evaluated options like panelGroupLayout and menu components, requesting experts opinion on the best way to do it.
Thanks in advance..Thanks AP.
Not like outlook. Here's some more details on what I'm looking for.
Create a menu bar.
Create a menu called "Actions"
Create two items under it called "Option1" and "Option2".
When I move the mouse over "Option1", I want a page to be shown on the right (just like how a sub menu will be displayed usually).
When I move the mouse over "Option2", I want to show a different page on the right (just like how a sub menu will be displayed usually).
Thanks in advance.
Edited by: Muruhanantham C on Dec 28, 2012 12:51 PM -
How to Create inner Sub-Node in Menu bar
Abap Masters,
I have Created Submenu name of <b>File</b>. But i want to include 3 inner Sub-Nodes in File. Like as
<b> Menu</b>
<b>File </b>> <b>Recent File</b>
<b>Deleted File</b>
<b>All Files</b>
Can Anyone of the ABAP Master Help me ?hi,
in ur program.
write the following code.
set pf-status 'MENU'.
double click menu.
u will be taken to menu painter,there in the menu bar section write main menu item name that is File in ur case.
double click on File.
u will get an option to add elements in the File menu give code and add the items.
and further if u wanna add submenu items double click the menu item (recent file) to get an option for adding sub menu items.
using the assigned codes give the funtionality in ur program
if help ful reward some points.
regards,
Ravi -
Edit Sub Menu Created With Dreamweaver
Does anyone know how to edit a sub menu that was created
using Dreamweaver? I need to link a new page to the sub menu but I
can't seem to find anyway to unlock the menu to amend the link.
Alternatively, one of my pages appears to be stuck on the server
saying that it is being edited by Macromedia Contribute after I
tried to publish it (this is the page I've re-created but can't
create a link to) so does anyone know how I'd re-set it or
something? I had thought of uninstalling Contribute then
re-installing it but I don't know if it'd make much difference?Open the template for this page (Select Modify > Templates > Open Attached Template) and add these comments into the <head>...</head> section:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Eddie and Alice Smith</title>
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<link href="css/main_css.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /></head>
You have probably deleted these comments when creating the template. These lines allow Dreamweaver to add code into the <head> section. Save your template and say Yes to allow the changes to pages that use this template (or just to the pages you want).
See http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7acda.h tml for more information.
Maybe you are looking for
-
Iphone OS 3.1 and iTunes 9 issue
I updated my itunes the other day and it seems to be working fine, but I updated my iPhone 3g to OS 3.1 yesterday, after I downloaded the file from itunes, I got a message letting me know "my phone is getting ready for update" after this message, itu
-
I don't find User Extended attributes in IDM 8
Hi all, I have installed idm8 and I need to extend the user attributes, but I can't find the User Extended Attributes object (or Extended User Attributes). Can anyone help me?
-
hi, i am facing a bsp-development in XI-context. As the XI expects xml-input via http-channel I need to set up forms which can send the query-string as xml. eg thisPageToXI.htm?name=john&job=nap&age=34&... I was looking in my WAS and found a couple o
-
i got a up date on my phone ,,,, but lost all my phone numbers ,,,,how do i get them back
-
Hi all, I am facing physical standby switchover issue. I set up a physical standby database everything works well. Last week I tried switching between primary abd standby, switchover also done well. Switchover happend log sequence at 1011. After a co