Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > How can I set the menu control height?

Reply
Thread Tools

How can I set the menu control height?

 
 
John
Guest
Posts: n/a
 
      09-16-2008
Hi,

I have a page with a scrollable DIV, and within that DIV, I have a few
asp.net menu controls. The idea being, the user mouses over the small
icons and is presented with a list of options.

One of these lists has more data than the page allows for, so the menu
control automatically creates the scroll up / scroll down commands at
both ends of the menu. The problem is; since it is within a
scrollable div, the menu scroller are hidden! The user needs to
scroll the div, in order to scroll the menu!

I'm attempting to resolve this, by making the menu shorter, but the
height property doesn't appear to work.

I've attached concise sample code below, and as you can see I want the
menu to be 2 inches long. The background is only colored for 2 inches,
but the menu goes the full length of the window.

I've also attempted to resolve it by adding the following code to the
top of the page, but when the user tries to scroll it, the menu
disappears.
--------------------------------
<style>#ctl01n0Items {height:2in;overflow-y:auto;}</style>
--------------------------------

So my question is :
Does anybody know how to set the height of the menu?
Or
Does anybody know how to get the menu to autosize according to it's
container, not the full window client area.

Thanks in advance, I'm hoping I'm missing something simple.

Regards,
John

--------------------------------
<asp:menu
DynamicMenuStyle-Height="2in"
DynamicMenuStyle-BackColor="LightBlue"
runat="server">
<items>
<asp:menuitem text="My Menu">
<asp:menuitem text="Item 1"/>
<asp:menuitem text="Item 2"/>
<asp:menuitem text="Item 3"/>
<asp:menuitem text="Item 4"/>
<asp:menuitem text="Item 5"/>
<asp:menuitem text="Item 6"/>
<asp:menuitem text="Item 7"/>
<asp:menuitem text="Item 8"/>
<asp:menuitem text="Item 9"/>
<asp:menuitem text="Item 10"/>
<asp:menuitem text="Item 11"/>
<asp:menuitem text="Item 12"/>
<asp:menuitem text="Item 13"/>
<asp:menuitem text="Item 14"/>
<asp:menuitem text="Item 15"/>
<asp:menuitem text="Item 16"/>
<asp:menuitem text="Item 17"/>
<asp:menuitem text="Item 18"/>
<asp:menuitem text="Item 19"/>
<asp:menuitem text="Item 20"/>
<asp:menuitem text="Item 21"/>
<asp:menuitem text="Item 22"/>
<asp:menuitem text="Item 23"/>
<asp:menuitem text="Item 24"/>
<asp:menuitem text="Item 25"/>
<asp:menuitem text="Item 26"/>
<asp:menuitem text="Item 27"/>
<asp:menuitem text="Item 28"/>
<asp:menuitem text="Item 29"/>
<asp:menuitem text="Item 30"/>
</asp:menuitem>
</items>
</asp:menu>
--------------------------------
 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      09-17-2008
Try the CSS Friendly adapters. You then have a better CSS experience and can
control many of the display elements better than you can with the default
(tables).

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#

or just read it:
http://feeds.feedburner.com/GregoryBeamer

********************************************
| Think outside the box! |
********************************************
"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I have a page with a scrollable DIV, and within that DIV, I have a few
> asp.net menu controls. The idea being, the user mouses over the small
> icons and is presented with a list of options.
>
> One of these lists has more data than the page allows for, so the menu
> control automatically creates the scroll up / scroll down commands at
> both ends of the menu. The problem is; since it is within a
> scrollable div, the menu scroller are hidden! The user needs to
> scroll the div, in order to scroll the menu!
>
> I'm attempting to resolve this, by making the menu shorter, but the
> height property doesn't appear to work.
>
> I've attached concise sample code below, and as you can see I want the
> menu to be 2 inches long. The background is only colored for 2 inches,
> but the menu goes the full length of the window.
>
> I've also attempted to resolve it by adding the following code to the
> top of the page, but when the user tries to scroll it, the menu
> disappears.
> --------------------------------
> <style>#ctl01n0Items {height:2in;overflow-y:auto;}</style>
> --------------------------------
>
> So my question is :
> Does anybody know how to set the height of the menu?
> Or
> Does anybody know how to get the menu to autosize according to it's
> container, not the full window client area.
>
> Thanks in advance, I'm hoping I'm missing something simple.
>
> Regards,
> John
>
> --------------------------------
> <asp:menu
> DynamicMenuStyle-Height="2in"
> DynamicMenuStyle-BackColor="LightBlue"
> runat="server">
> <items>
> <asp:menuitem text="My Menu">
> <asp:menuitem text="Item 1"/>
> <asp:menuitem text="Item 2"/>
> <asp:menuitem text="Item 3"/>
> <asp:menuitem text="Item 4"/>
> <asp:menuitem text="Item 5"/>
> <asp:menuitem text="Item 6"/>
> <asp:menuitem text="Item 7"/>
> <asp:menuitem text="Item 8"/>
> <asp:menuitem text="Item 9"/>
> <asp:menuitem text="Item 10"/>
> <asp:menuitem text="Item 11"/>
> <asp:menuitem text="Item 12"/>
> <asp:menuitem text="Item 13"/>
> <asp:menuitem text="Item 14"/>
> <asp:menuitem text="Item 15"/>
> <asp:menuitem text="Item 16"/>
> <asp:menuitem text="Item 17"/>
> <asp:menuitem text="Item 18"/>
> <asp:menuitem text="Item 19"/>
> <asp:menuitem text="Item 20"/>
> <asp:menuitem text="Item 21"/>
> <asp:menuitem text="Item 22"/>
> <asp:menuitem text="Item 23"/>
> <asp:menuitem text="Item 24"/>
> <asp:menuitem text="Item 25"/>
> <asp:menuitem text="Item 26"/>
> <asp:menuitem text="Item 27"/>
> <asp:menuitem text="Item 28"/>
> <asp:menuitem text="Item 29"/>
> <asp:menuitem text="Item 30"/>
> </asp:menuitem>
> </items>
> </asp:menu>
> --------------------------------


 
Reply With Quote
 
 
 
 
John
Guest
Posts: n/a
 
      09-18-2008
Hi Gregory,

Thanks for the idea, I've never heard of control adapters before. I'm
glad I now know about it.

Anyway, I wound up grouping the items into submenus so I could resolve
the situation immediately and deploy. And I don't know if
implementing control adapters is worth the effort at this point
anyway.

Thanks you for the response though.

Sincerely,
John


On Sep 16, 11:37*pm, "Cowboy \(Gregory A. Beamer\)"
<(E-Mail Removed)> wrote:
> Try the CSS Friendly adapters. You then have a better CSS experience and can
> control many of the display elements better than you can with the default
> (tables).
>
> --
> Gregory A. Beamer
> MVP, MCP: +I, SE, SD, DBA
>
> Subscribe to my bloghttp://feeds.feedburner.com/GregoryBeamer#
>
> or just read it:http://feeds.feedburner.com/GregoryBeamer
>
> ********************************************
> | Think outside the box! * * * * * * * * * * * * * * * |
> ********************************************"John" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed)...
>
>
>
> > Hi,

>
> > I have a page with a scrollable DIV, and within that DIV, I have a few
> > asp.net menu controls. *The idea being, the user mouses over the small
> > icons and is presented with a list of options.

>
> > One of these lists has more data than the page allows for, so the menu
> > control automatically creates the scroll up / scroll down commands at
> > both ends of the menu. *The problem is; since it is within a
> > scrollable div, the menu scroller are hidden! *The user needs to
> > scroll the div, in order to scroll the menu!

>
> > I'm attempting to resolve this, by making the menu shorter, but the
> > height property doesn't appear to work.

>
> > I've attached concise sample code below, and as you can see I want the
> > menu to be 2 inches long. The background is only colored for 2 inches,
> > but the menu goes the full length of the window.

>
> > I've also attempted to resolve it by adding the following code to the
> > top of the page, but when the user tries to scroll it, the menu
> > disappears.
> > --------------------------------
> > <style>#ctl01n0Items {height:2in;overflow-y:auto;}</style>
> > --------------------------------

>
> > So my question is :
> > Does anybody know how to set the height of the menu?
> > Or
> > Does anybody know how to get the menu to autosize according to it's
> > container, not the full window client area.

>
> > Thanks in advance, I'm hoping I'm missing something simple.

>
> > Regards,
> > John

>
> > --------------------------------
> > <asp:menu
> > DynamicMenuStyle-Height="2in"
> > DynamicMenuStyle-BackColor="LightBlue"
> > runat="server">
> > <items>
> > <asp:menuitem text="My Menu">
> > <asp:menuitem text="Item 1"/>
> > <asp:menuitem text="Item 2"/>
> > <asp:menuitem text="Item 3"/>
> > <asp:menuitem text="Item 4"/>
> > <asp:menuitem text="Item 5"/>
> > <asp:menuitem text="Item 6"/>
> > <asp:menuitem text="Item 7"/>
> > <asp:menuitem text="Item 8"/>
> > <asp:menuitem text="Item 9"/>
> > <asp:menuitem text="Item 10"/>
> > <asp:menuitem text="Item 11"/>
> > <asp:menuitem text="Item 12"/>
> > <asp:menuitem text="Item 13"/>
> > <asp:menuitem text="Item 14"/>
> > <asp:menuitem text="Item 15"/>
> > <asp:menuitem text="Item 16"/>
> > <asp:menuitem text="Item 17"/>
> > <asp:menuitem text="Item 18"/>
> > <asp:menuitem text="Item 19"/>
> > <asp:menuitem text="Item 20"/>
> > <asp:menuitem text="Item 21"/>
> > <asp:menuitem text="Item 22"/>
> > <asp:menuitem text="Item 23"/>
> > <asp:menuitem text="Item 24"/>
> > <asp:menuitem text="Item 25"/>
> > <asp:menuitem text="Item 26"/>
> > <asp:menuitem text="Item 27"/>
> > <asp:menuitem text="Item 28"/>
> > <asp:menuitem text="Item 29"/>
> > <asp:menuitem text="Item 30"/>
> > </asp:menuitem>
> > </items>
> > </asp:menu>
> > --------------------------------- Hide quoted text -

>
> - Show quoted text -


 
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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How can I set the menu control height? John ASP .Net 2 09-18-2008 06:24 PM
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
2.0 Menu control : Can the dynamic popup menu items be divided into 2 columns instead of 1? Perry Loh ASP .Net Web Controls 0 03-24-2006 04:44 AM
Iterating through all the menu/child items in a menu control Bryan ASP .Net 1 03-01-2006 09:38 AM



Advertisments