Welcome Guest Search | Active Topics | Sign In | Register

Selected Menu Item Forecolor Options
Ray Bradley
Posted: Monday, June 9, 2008 6:00:55 AM
Rank: Member
Groups: Member

Joined: 10/31/2007
Posts: 18
I'm trying to change the forecolor of the selected menu item... I've tried to do it in javascript... and also VB code-behind... no luck... yet?

Dim menu As New EO.Web.MenuItem("Menu1")
menu.SelectedStyle.ForeColor = System.Drawing.Color.Red

Leaving it as selected would be ok, too... (can't figure that out either)... I want the user to be able to see which menu item was last selected... I thought turning it red is best.

eo_support
Posted: Monday, June 9, 2008 8:27:43 AM
Rank: Administration
Groups: Administration

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

menu.SelectedStyle.ForeColor = System.Drawing.Color.Red

Is the correct code. But I am not sure about:

Dim menu As New EO.Web.MenuItem("Menu1")

The code as it is probably won't work because setting it on a newly created menu item in the air wouldn't have anything to do with your existing menu. To change your existing menu, you would need to set it on your existing menu. Two more notes:

1. You can set it either on an individual menu item or a look item. For more information about look item, please check the documentation;

2. Setting SelectedStyle alone is not enough. You also need to set the menu item's Selected to true.

Thanks


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.