PDA

View Full Version : margin in menubar


aner77
02-10-2007, 01:14 AM
Hi ,I try to remove the left margin from the menubar control, but I dont know how. I tried to set marginWidth to 0 but the Adobe flex builder doesnt compile it. Is there a simple way to remove it?

dr_zeus
02-12-2007, 05:52 PM
It might be paddingLeft.

aner77
02-15-2007, 02:44 PM
Aactually there isnt paddingLeft attribute.
from looking in the source code of mx:menubar i have found that there is private static memeber margin_width that initalized to 10.
so still no solution....

dr_zeus
02-15-2007, 04:48 PM
Oh, I see. MARGIN_WIDTH is actually a static constant. It is always used for positioning, and there is no way to change it through a property or a style. You'll need to subclass MenuBar and change the way it draws in updateDisplayList.

aner77
02-16-2007, 08:05 AM
Thanks, It worked!