Menu Control

J

Jay

I have been experimenting with the new Menu control. When you define sub
menu items an arrow automatically appears to the right to indicate that
there are sub menu items. The problem is what when you define a horizontal
menu and you increase the width of your menu bar so that the top level menu
items are separated a bit, the arrows are positioned far from the actual
menu item and it does not look good. When the menu is horizontal I wan to
position the arrows a specified number of pixels to the right of the end of
the menu.

When the menu is vertical the arrows are positioned OK.

Help

Jay
 
S

Steven Cheng[MSFT]

Hi Jay,

Welcome to ASPNET newsgroup.
As for the ASP.NET 2.0 Menu control's menu item popout image (the arrow),
when displayed under horizontal mode, the arrow(popout image) are something
like a separator image, so when we explicitly increase the menu's width, it
will display in the middle betwen two menu items (in the main menu
bar....). Currently I haven't found any setting or properties to modify
this image's position , however I think you can consider the following
options:

1. Just use the StaticEnableDefaultPopOutImage="False" to disable the
default popout image so that it won't display, this may looks better for
horizontal mode

2. You can also use the StaticPopOutImageUrl property to use your custom
image (maybe a separator image....)

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Jay" <[email protected]>
| Subject: Menu Control
| Date: Wed, 11 Jan 2006 15:27:51 -0500
| Lines: 16
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
| NNTP-Posting-Host: c-24-98-72-48.hsd1.ga.comcast.net 24.98.72.48
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontrols:32412
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
|
| I have been experimenting with the new Menu control. When you define sub
| menu items an arrow automatically appears to the right to indicate that
| there are sub menu items. The problem is what when you define a
horizontal
| menu and you increase the width of your menu bar so that the top level
menu
| items are separated a bit, the arrows are positioned far from the actual
| menu item and it does not look good. When the menu is horizontal I wan
to
| position the arrows a specified number of pixels to the right of the end
of
| the menu.
|
| When the menu is vertical the arrows are positioned OK.
|
| Help
|
| Jay
|
|
|
 
J

Jay

Thanks. This did help.

Do you have any thoughts on how to implement rollovers with the menu even if
it requires creating a cutom control that is a subclass of the menu class.
I would like to be able to specify a rollover or hover image URL along with
the normal image URL and then have the server control generate the
javascript to handle the rolloever (hover) effect.

Jay
 
S

Steven Cheng[MSFT]

Thanks for your response Jay,

As for specify a rollover or hover image, So far I think the buildin image
property can not help since it only point to a certain image file or
stream.... Also, there dosn't exists a template directly for defining
custom html code for the popout icon .... If you do want customize this,
what I can get is completely define your own Menu content through the
"StaticItemTemplate", e.g:

<asp:Menu ID="Menu1" runat="server">
<StaticItemTemplate >
//define our static menu template here....
</StaticItemTemplate>
</asp:Menu>

Thus, we can use our custom html to define the complete static menu
template(include the popout image, we can use our own html or dhtml
code....)

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Jay" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: Re: Menu Control
| Date: Fri, 13 Jan 2006 08:08:37 -0500
| Lines: 85
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
| NNTP-Posting-Host: c-24-98-72-48.hsd1.ga.comcast.net 24.98.72.48
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontrols:32453
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
|
| Thanks. This did help.
|
| Do you have any thoughts on how to implement rollovers with the menu even
if
| it requires creating a cutom control that is a subclass of the menu
class.
| I would like to be able to specify a rollover or hover image URL along
with
| the normal image URL and then have the server control generate the
| javascript to handle the rolloever (hover) effect.
|
| Jay
|
| | > Hi Jay,
| >
| > Welcome to ASPNET newsgroup.
| > As for the ASP.NET 2.0 Menu control's menu item popout image (the
arrow),
| > when displayed under horizontal mode, the arrow(popout image) are
| > something
| > like a separator image, so when we explicitly increase the menu's
width,
| > it
| > will display in the middle betwen two menu items (in the main menu
| > bar....). Currently I haven't found any setting or properties to modify
| > this image's position , however I think you can consider the following
| > options:
| >
| > 1. Just use the StaticEnableDefaultPopOutImage="False" to disable the
| > default popout image so that it won't display, this may looks better
for
| > horizontal mode
| >
| > 2. You can also use the StaticPopOutImageUrl property to use your custom
| > image (maybe a separator image....)
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| > --------------------
| > | From: "Jay" <[email protected]>
| > | Subject: Menu Control
| > | Date: Wed, 11 Jan 2006 15:27:51 -0500
| > | Lines: 16
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| > | X-RFC2646: Format=Flowed; Original
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| > | Message-ID: <[email protected]>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
| > | NNTP-Posting-Host: c-24-98-72-48.hsd1.ga.comcast.net 24.98.72.48
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP15.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet.webcontrols:32412
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
| > |
| > | I have been experimenting with the new Menu control. When you define
| > sub
| > | menu items an arrow automatically appears to the right to indicate
that
| > | there are sub menu items. The problem is what when you define a
| > horizontal
| > | menu and you increase the width of your menu bar so that the top level
| > menu
| > | items are separated a bit, the arrows are positioned far from the
actual
| > | menu item and it does not look good. When the menu is horizontal I
wan
| > to
| > | position the arrows a specified number of pixels to the right of the
end
| > of
| > | the menu.
| > |
| > | When the menu is vertical the arrows are positioned OK.
| > |
| > | Help
| > |
| > | Jay
| > |
| > |
| > |
| >
|
|
|
 
M

Matt Sollars

Steven,

I am experiencing what seems a lot like a bug with the technique you
described.

I, first, tried setting StaticEnableDefaultPopOutImage="False" for my
horizontal menu control. The result was some extra space after each
static menu item. I viewed the source in several browsers to find that
the control was emitting this extra table data:

<td style="width:3px;"></td>

When the control renders the pop-out image, it uses a table data with 0
width.

<td style="width:0px;"><img ... /></td>

Second, I tried using the StaticItemTemplate with no success. All this
template allows me to do is override how the text is rendered for the
item. The control still emits the second table data after the template
contents. Again it is 0 width with StaticEnableDefaultPopOutImage set to
"True" and 3 pixels wide with StaticEnableDefaultPopOutImage set to "False".

I'm stumped! Why 3 pixels when I don't want the pop-out image? Why not
keep it at 0 pixels? Is it a bug?


Thanks in advance.

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top