|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Menu ControlI 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 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" <Jay@newsgroups.nospam> microsoft.public.dotnet.framework.aspnet.webcontrols:32412| 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: <OBGDC2uFGHA.2***@TK2MSFTNGP15.phx.gbl> | 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 Show quoteHide quote | 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 | | | 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 Show quoteHide quote "Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message news:LZnQSizFGHA.3680@TK2MSFTNGXA02.phx.gbl... > 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" <Jay@newsgroups.nospam> > | 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: <OBGDC2uFGHA.2***@TK2MSFTNGP15.phx.gbl> > | 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 > | > | > | > 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" <Jay@newsgroups.nospam> <LZnQSizFGHA.3***@TK2MSFTNGXA02.phx.gbl>| References: <OBGDC2uFGHA.2***@TK2MSFTNGP15.phx.gbl> | Subject: Re: Menu Control microsoft.public.dotnet.framework.aspnet.webcontrols:32453| 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: <uZJF9JEGGHA.1***@TK2MSFTNGP10.phx.gbl> | 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 Show quoteHide quote | 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]" <stch***@online.microsoft.com> wrote in message | news:LZnQSizFGHA.3680@TK2MSFTNGXA02.phx.gbl... | > 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" <Jay@newsgroups.nospam> | > | 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: <OBGDC2uFGHA.2***@TK2MSFTNGP15.phx.gbl> | > | 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,
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: Show quoteHide quote > 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.) Hi,
Maybe it can help you. Would you want to try it to using wakicoolbar for asp.net. The download url is: http://www.aspxcontrol.net/download/wakicoolbar_en.zip. The demo online as below: http://www.aspxcontrol.net/demo/wakicoolbar/sample.aspx Good luck. waki Show quoteHide quote "Matt Sollars" <msoll***@worwic.edu> wrote in message news:OJ5dmkgHGHA.2668@tk2msftngp13.phx.gbl... > 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.) Not sure if this is what you are talking about but there is a 3px item
spacing default(i guess its a default) if you you change the
StaticMenuItemStyle-ItemSpacing property to 0px it should go away.
--
MI1
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------
looking for a special kind of table control
Control-level security Paging and Filtering in Gridview (.NET 2.0) Question on Submit all fields on a tabstrip that is using multipage Highlight row in a gridview after formview insert The mystery of passing form values ObjectDataSource XML Editor Refreash DesignTime control. How can I prevent a GridView from opening when the page is firstentered ? |
|||||||||||||||||||||||