Welcome Guest Search | Active Topics | Sign In | Register

no backgroundimages in disabled menuitems Options
Christian Schweda
Posted: Monday, September 22, 2008 2:29:26 AM
Rank: Newbie
Groups: Member

Joined: 6/15/2007
Posts: 4
Hi,
since I use EO.Web Controls 2008, my disabled menu items are displayed without background-images. The background-color is gray.
Here is a sample:

<eo:Menu ID="Menu1" runat="server" Width="200px" ControlSkinID="None" CssFile="~/App_Themes/cexp/cexp.css" ImageBaseDirectory="~/Images/">
<LookItems>
<eo:MenuItem DisabledStyle-CssClass="eomdis" HoverStyle-CssClass="eomact" Image-Mode="TextBackground" Image-Url="menu.gif" ItemID="_TopLevelItem" NormalStyle-CssClass="eom">
<SubMenu OffsetX="0" OffsetY="0" ShadowDepth="0" Style-CssClass=""></SubMenu>
</eo:MenuItem>
<eo:MenuItem Image-Mode="ImageOnly" Image-Url="menu_s.gif" IsSeparator="True" ItemID="_Separator"></eo:MenuItem>
<eo:MenuItem DisabledStyle-CssClass="eomdis" Height="20" HoverStyle-CssClass="eomact"
Image-Mode="TextBackground" Image-Url="menu_b.gif" ItemID="_Default" NormalStyle-CssClass="eom"></eo:MenuItem>
</LookItems>
<TopGroup>
<Items>
<eo:MenuItem Image-Url="menu_l.gif" IsSeparator="True"></eo:MenuItem>
<eo:MenuItem NormalStyle-CssClass="" Text-Html="New Menu Item">
<SubMenu>
<Items>
<eo:MenuItem Text-Html="New Menu Item"></eo:MenuItem>
<eo:MenuItem Text-Html="New Menu Item"></eo:MenuItem>
<eo:MenuItem Text-Html="New Menu Item"></eo:MenuItem>
</Items>
</SubMenu>
</eo:MenuItem>
<eo:MenuItem Image-Url="menu_s.gif" IsSeparator="True"></eo:MenuItem>
<eo:MenuItem Disabled="True" Text-Html="New Menu Item">
<SubMenu>
<Items>
<eo:MenuItem Text-Html="New Menu Item"></eo:MenuItem>
</Items>
</SubMenu>
</eo:MenuItem>
<eo:MenuItem IsSeparator="True" Image-Url="menu_s.gif"></eo:MenuItem>
<eo:MenuItem Text-Html="New Menu Item"></eo:MenuItem>
<eo:MenuItem Image-Url="menu_r.gif" IsSeparator="True"></eo:MenuItem>
</Items>
</TopGroup>
</eo:Menu>

What can I do?
eo_support
Posted: Monday, September 22, 2008 6:28:17 AM
Rank: Administration
Groups: Administration

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

We are not aware of any changes on that in 2008. It may have to do with your CSS file. Can you try it without the CSS file and see if the same problem occurs?

Thanks
Christian Schweda
Posted: Tuesday, September 23, 2008 5:21:23 AM
Rank: Newbie
Groups: Member

Joined: 6/15/2007
Posts: 4
I tested my menu without CSS file - the same result.
With EO.Web.dll 5.0.51.2 the menu looks as expected.
If I use EO.Web.dll 6.0.34.2 the background-color is gray and no background-image is displayed.

Thanks for your help
eo_support
Posted: Tuesday, September 23, 2008 8:08:27 AM
Rank: Administration
Groups: Administration

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

Please create a test project that demonstrates the problem and send it us. We will look into it as soon as we have that. We will PM you as to where to send.

Thanks!
eo_support
Posted: Wednesday, September 24, 2008 5:59:30 AM
Rank: Administration
Groups: Administration

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

We have looked into the code you sent to us. The issue is caused by a new feature introduced by version 2008 (6.x). Our menu supports multiple images for multiple states. For example, you can specify one background image for "Normal" state and another background image for "Disabled" state. In the old version, "Normal" image is used if no "Disabled" image is provided. In the new version, when "Disabled" image is not provided, our controls automatically generate a "Disabled" version of "Normal" image and then use that "Disabled" version. So the difference is, previous version use "Normal" image as is, while the new version uses "Normal" image to generate a "Disabled" (grayscale) image. The background images in your test code are actually applied. But it's the automatically generated grayscale version that gets applied, not the original version.

The new logic works very well for regular images such as LeftIcon. Where as you only need to specify one image and the menu will automatically generates the disabled version for you. It however does not work well, as you have observed, for background images because very often the menu item have the same background image for both "Normal" and "Disabled" item (the text colors are usually different). We will see if we can exclude background image from this new logic so that no "disabled" images for background images are generated.

In the mean time, you can easily work around this problem by explicitly providing an image for disabled state. As soon as you provide one, the menu will not try to automatically generate one for you.

Hope this helps.

Thanks
eo_support
Posted: Tuesday, September 30, 2008 4:10:35 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
This issue has been addressed in build 2008.0.36.


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.