PDA

View Full Version : [CLOSED] [2.2] Ext.Menu leaving a blank space to the left



FVNoel
Jun 14, 2013, 10:59 AM
Hello, I'm trying to use an Ext.Menu for a filter menu panel, however, the menu is leaving a blank space to the left (probably for the icons, which I don't want to use) and i don't k
now how to make it not leave that blank space.

Here's a picture of what I am getting.
6376

I would like to remove the space to the left of the field labels in menu.

This is my code:


<ext:ResourceManager runat="server" ID="RM" />
<ext:Button Text="Test button" runat="server" ID="btnTest">
<Menu>
<ext:Menu runat="server" ID="mnuTest" BodyPadding="10">
<Items>
<ext:TextField runat="server" ID="txtTest1" FieldLabel="Filter1" />
<ext:ComboBox runat="server" ID="cmbTest2" FieldLabel="Filter2">
<Items>
<ext:ListItem Text="Test1" Value="Test1" />
<ext:ListItem Text="Test2" Value="Test2" />
</Items>
</ext:ComboBox>
</Items>
</ext:Menu>
</Menu>
</ext:Button>

Akpenob
Jun 14, 2013, 11:19 AM
I would like to remove the space to the left of the field labels in menu.



Hi FVNoel

The reason it does this, is because you have not set the plain variable on the menu to true
Set Plain = true, if you dont want to show the area where the icons are shown

Ex. Server side vise




Menu myMenu = new Menu()
{
ID = myMenuTest,
Plan = true
};



Html vise



<ext:Menu runat="server" ID="myMenu" Plain ="true">
</ext:Menu>

FVNoel
Jun 14, 2013, 12:35 PM
Cool, it works. Thanks!

Daniil
Jun 14, 2013, 1:39 PM
Hi @FVNoel,

Yes, the Plain setting is made specially for your case.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.menu.Menu-cfg-plain

@Akpenob, thank you for your contribution! Much appreciated.