View Full Version : MenuBar Component - probs with menuitem heights and widths

12-07-2006, 12:28 PM
Hi all,

first: I'm new here and relatively new to Flash, so please forgive me if my post is placed wrong here or my question seems silly for pros... ;)

In my application (fla-file executed as projector) I want to include a menubar with different menuitems, submenus etc. I have a xml-file with some menuitems and add some menuitems dynamically during runtime. That works so far: my menubar is visible with the menuitems it should have. (BTW (if that's important): I use the Sample-Theme.)

Since the application should be used by older people or handicapped persons, I have to use a bigger fontSize than the default 10pt. But when I change the fontSize, the cellwidths and -heights of the menuitems are too small (tails and some part of the labels aren't displayed). :confused:
So how can I change the height and width of the menuitems that everything is displayed correctly?
Any suggestions?

12-08-2006, 12:25 PM
Hi there,

I tried a little bit and realized that I just have to set the fontSize first (before I set other styles). The width of the menuItem-"cells" is okay then. But the height of the menuItems still is not big enough - the tails of the letters aren't displayed.
I have a screenshot of that problem as attachment, hope that's okay.
Perhaps you can find a mistake in my code below (it's not my original code because the menu is created dynamically with xml, but I don't think that my problem is dependent on that part ;) ):
import mx.controls.Menu;
import mx.controls.MenuBar;

var my_mb:MenuBar;
var myMenu_file:Menu;
var myMenu_edit:Menu;
var myMenu_view:Menu;

myMenu_file = my_mb.addMenu("File");
myMenu_file.addMenuItem({label:"New", instanceName:"new"});
myMenu_file.addMenuItem({label:"Open", instanceName:"open"});
myMenu_file.addMenuItem({label:"Close", instanceName:"close"});

myMenu_edit = my_mb.addMenu("Edit");
myMenu_edit.addMenuItem({label:"Copy and do something else", instanceName:"copy"});
myMenu_edit.addMenuItem({label:"Paste", instanceName:"paste"});

myMenu_view = my_mb.addMenu("View");
myMenu_view.addMenuItem({label:"Zoom", instanceName:"zoom"});

my_mb.setStyle("fontSize", "18");
my_mb.setStyle("borderStyle", "outset");
my_mb.setStyle("shadowColor", "0x0D0C0A");
my_mb.setStyle("highlightColor", "0xC9C9B7");
my_mb.setStyle("backgroundColor", "0xA09E91");

Did anybody have the same or a similar problem before and knows how to solve it or to work around?
If there are any questions just ask ;)