Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Menu Control

Reply
Thread Tools

Menu Control

 
 
Jay
Guest
Posts: n/a
 
      01-11-2006
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


 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      01-12-2006
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" <>
| 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: <>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro ls
| NNTP-Posting-Host: c-24-98-72-48.hsd1.ga.comcast.net 24.98.72.48
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontro ls:32412
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro ls
|
| 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
|
|
|

 
Reply With Quote
 
 
 
 
Jay
Guest
Posts: n/a
 
      01-13-2006
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

"Steven Cheng[MSFT]" <> wrote in message
news:...
> 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" <>
> | 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: <>
> | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro ls
> | NNTP-Posting-Host: c-24-98-72-48.hsd1.ga.comcast.net 24.98.72.48
> | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
> | Xref: TK2MSFTNGXA02.phx.gbl
> microsoft.public.dotnet.framework.aspnet.webcontro ls:32412
> | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro ls
> |
> | 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
> |
> |
> |
>



 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      01-16-2006
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" <>
| References: <>
<>
| 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: <>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro ls
| NNTP-Posting-Host: c-24-98-72-48.hsd1.ga.comcast.net 24.98.72.48
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontro ls:32453
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro ls
|
| 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
|
| "Steven Cheng[MSFT]" <> wrote in message
| news:...
| > 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" <>
| > | 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: <>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro ls
| > | NNTP-Posting-Host: c-24-98-72-48.hsd1.ga.comcast.net 24.98.72.48
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet.webcontro ls:32412
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro ls
| > |
| > | 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
| > |
| > |
| > |
| >
|
|
|

 
Reply With Quote
 
Matt Sollars
Guest
Posts: n/a
 
      01-20-2006
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



Steven Cheng[MSFT] wrote:
> 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.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Menu Control and Sitemap, eliminate the home column on the menu display empire5 ASP .Net 1 01-11-2007 03:30 AM
How do I set selected Menu item in a asp:menu control? goran.strand@gmail.com ASP .Net 0 12-22-2006 08:05 AM
Horizontal Menu Navigation Web Control - Spaces Between Menu Items Philip ASP .Net Web Controls 1 03-21-2006 01:55 PM
Iterating through all the menu/child items in a menu control Bryan ASP .Net 1 03-01-2006 09:38 AM
Adding Access keys to menu items in the Menu control Mike Tavares ASP .Net Web Controls 2 01-05-2006 11:06 AM



Advertisments