🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.acrobat.sdk
Article #317

Adding a dropdown menu to a toolbar button

#317
From: Bina
Date: Tue, 03 Mar 2009 20:26
24 lines
1520 bytes
How would you add a submenu or dropdown menu to a toolbar button, similar to the tools in the "Task" toolbar?

I tried the following JavaScript, included in my JavaScripts directory, but the popout menu will only display in the viewport, not over any toolbars which may be below the button.

It looks like addSubMenu should only be used to add submenus to the Menus, not the toolbar buttons.

myNewMenuPopUp = app.trustedFunction( function()	
{
app.beginPriv();
var cChoice = app.popUpMenu("Flatten Page", "Flatten Document");

switch(cChoice){
	case "Flatten Page":
		flattenPages(this.pageNum);
		break;
	case "Flatten Document":
		flattenPages();
	 	break;
	}

app.endPriv();
});

app.addToolButton({ cName: "Document tools button", cExec: "myNewMenuPopUp();", cMarked: "event.rc = false", cEnable: true, cTooltext: "Document tools",cLabel: "Document Tools"});
Technical Details
Message-ID: <59b81a92.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: 10177e,84ebabe6b75155a4,start
X-Google-Attributes: gid10177e,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bina@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.acrobat.sdk
Subject: Adding a dropdown menu to a toolbar button
Message-ID: <59b81a92.-1@webcrossing.la2eafNXanI>
Date: Tue, 3 Mar 2009 12:26:52 -0800
Lines: 30
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit