Welcome Guest Search | Active Topics | Sign In | Register

select style doesnt work for side menu in look item _Default Options
Peymaneh
Posted: Tuesday, September 18, 2007 9:53:09 AM
Rank: Member
Groups: Member

Joined: 9/14/2007
Posts: 12
hi,
i try to change background color for selected item in side menu but it doesn’t effect. I put it on select style but it is not working. How can I force it to change the background color of selected menu item?


eo_support
Posted: Tuesday, September 18, 2007 10:05:38 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

There is a long answer for that:

http://www.essentialobjects.com/ViewDoc.aspx?t=MenuCommon%2fLookSkinAndTheme%2fLookSkinTheme.html

How TreeView applies style is much more complicated (and yet very powerful) than what may appear on the surface. You will also want to go over topics under "Style and Appearance". Once you read those you can try change various properties on the TreeView to see how they work.

Thanks
Peymaneh
Posted: Tuesday, September 18, 2007 10:11:02 AM
Rank: Member
Groups: Member

Joined: 9/14/2007
Posts: 12
actually i know how to change the Appearance of tree view by CSS and it works with tree view but i have the problem with side menu i can not do it on side menu and it is just with the selected item, the rest is working
eo_support
Posted: Tuesday, September 18, 2007 10:19:29 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

All our navigation controls applies styles the same way. The only difference between slide menu and TreeView is, when a top level item is expanded, it automatically enters "selected" state. For this reason, slide menu almost always make use of _TopLevelItem. Still, even TreeView can make use of _TopLevelItem, it just doesn't use it often.

Thanks
Peymaneh
Posted: Tuesday, September 18, 2007 10:26:32 AM
Rank: Member
Groups: Member

Joined: 9/14/2007
Posts: 12
the _TopLevelItem selected style only effect the top menu item but i need to change back ground for sub menu item
eo_support
Posted: Tuesday, September 18, 2007 10:49:44 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Then most likely you didn't even select the item at all. While the TreeView automatically select a node when the node is clicked, a SlideMenu is purely used for navigation purpose and it does not automatically select on click by default. When you click a slide menu item, it navigates you to NavigateUrl or raises a server event and that would be the end of it.

If you use NavigateUrl, you can make AutoSelectSource to automatically select the item for you. Otherwise you will need to select the item by yourself, either on the server side or on the client side. On the server side is easy, on the client side you can handle ClientSideOnItemClick:

Code: JavaScript
var g_lastSelectedItem = null;

function on_slide_menu_click(e, info)
{
    if (g_lastSelectedItem)
        g_lastSelectedItem.setSelected(false);

    var item = info.getItem();
    if (item.getLevel() == 0)
        return;

    g_lastSelectedItem = item;
    g_lastSelectedItem.setSelected(true);
}



You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.