|
Rank: Newbie Groups: Member
Joined: 7/23/2009 Posts: 5
|
Hi,
We are testing the Menu of EO.
We have a menu with 3 levels like the examples you have with red tabs.
The problem is that our second level shows in relation with the correspondent upper menu option. We are using Menu1_ItemDataBound.
Can any one help us?
Tk
João Araújo
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
João Araújo wrote:The problem is that our second level shows in relation with the correspondent upper menu option. Hi, We do not know what you mean by "second level shows in relation with the correspondent upper menu options". Can you explain in detail? Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/23/2009 Posts: 5
|
Hi, can i send a print screen of my menu?
How can i do that?
I sow the tag img but did not understand how to use it to put a image there.
Below i try to explain you
How it is now:
| CAS| TMS|IMS| -> First level <<>>|File ||Config|Edit| ---> second level (<<>> in this shows the displacement)
How we want:
| CAS| TMS|IMS| -> First level |File||Config|Edit| ---> second level (no <<>> in this)
In this case we selected the option TMS in the first level. You see that the option File is showing a bit to the rigth (I wrote <<>> to show the displacement ).
Hope i explained well.
Tk again.
João Araújo
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, To align the second level towards left, you will need to set the sub menu's OffsetX to a nagative value, for example, the RedTab sample has the second submenu's OffsetX set to -84 and the third submenu's OffsetX set to -162. You can set this value inside ItemDataBound event:
Code: C#
if (e.MenuItem.Level == 0)
{
if (e.MenuItem.Index == 1)
e.MenuItem.SubMenu.OffsetX = -84;
else if (e.MenuItem.Index == 2)
e.MenuItem.SubMenu.OffsetX = -162;
}
You can also set it once you are done with data binding:
Code: C#
Menu1.DataBind();
Menu1.Items[1].SubMenu.OffsetX = -84;
Menu1.Items[2].SubMenu.OffsetY = -162;
If you do not know the OffsetX value, you will need to use multiple menus. This sample demonstrates how to use multiple menus and using JavaScript to wire them up together so that they look like a single menu: http://demo.essentialobjects.com/Default.aspx?path=Menu\menu_programming\_i2\red_tabs2This topic provided more details and code on this: http://www.essentialobjects.com/forum/postst3536_Web-Menu-Submenu-goes-out-of-the-controol.aspxHope this helps. Thanks!
|
|