Menu Control

Discussion in 'ASP .Net Web Controls' started by Jay, Jan 11, 2006.

  1. Jay

    Jay Guest

    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
     
    Jay, Jan 11, 2006
    #1
    1. Advertising

  2. 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.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
    |
    |
    |
     
    Steven Cheng[MSFT], Jan 12, 2006
    #2
    1. Advertising

  3. Jay

    Jay Guest

    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.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
    > |
    > |
    > |
    >
     
    Jay, Jan 13, 2006
    #3
  4. 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.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
    |
    | "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.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
    | > |
    | > |
    | > |
    | >
    |
    |
    |
     
    Steven Cheng[MSFT], Jan 16, 2006
    #4
  5. Jay

    Matt Sollars Guest

    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.)
     
    Matt Sollars, Jan 20, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bryan
    Replies:
    1
    Views:
    780
    Steven Cheng[MSFT]
    Mar 1, 2006
  2. Replies:
    0
    Views:
    1,447
  3. empire5
    Replies:
    1
    Views:
    585
    =?Utf-8?B?UmVuZ2E=?=
    Jan 11, 2007
  4. Mike Tavares

    Adding Access keys to menu items in the Menu control

    Mike Tavares, Dec 23, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    419
  5. Philip
    Replies:
    1
    Views:
    320
Loading...

Share This Page