Telerik
Skip Navigation LinksHome / Community / Forums / ASP.NET > Menu > Menu single level w/ rollover

Menu single level w/ rollover

Feed from this thread
  • Fredrick Zilz avatar

    Posted on Nov 22, 2005 (permalink)

    I am trying to determine how I would construct a menu with only one level graphics only.  One graphic for itemout and one for item over.  Seperate graphics for each menu item.  Traditional rollover image type menu.

    Looking forward to your assistance.

    Working with RadControls Q4 .net2.0 in VS.net 2005

    Reply

  • Telerik Admin admin's avatar

    Posted on Nov 23, 2005 (permalink)

    Hi Fredrick,

    Thanks for contacting us.

    Yes, there is an easy way to rollover images on mouse_over and mouse_clicked events that are automatically handled by r.a.d.menu. You should use the following MenuItem's properties:

    • Image - you can use images for your MenuItems (instead of text labels). Image specifies the filename of the image displayed for that particular item. The image file must be located in the image directory of your application, as specified in the ImagesBasedDir property of RadMenu. The Image cancels all Text and Text-related properties (LeftLogo, RightLogo, etc)
    • ImageOver - the image that is displayed when the mouse pointer is over the item. Works only if Image was specified
    • ImageClicked - the image that is displayed when item is clicked. Works only if Image was specified

    Hope this helps.

    Let us know if you need further assistance.

    Sincerely yours,

    Nick
    the telerik team

    Reply

  • Fredrick Zilz avatar

    Posted on Nov 23, 2005 (permalink)

    Thank you for your quick response, I will try this.

    I have run into another snag:

    After adding the radcontrols folder to the root of my website. VS.net 2005 fails to build the website. With an error at the radcontrols/chart/image.aspx file, cannot load file Telerik.WebControls.Dialogs.ChartImage. I am guessing that I am missing a reference – but which one?

    I added Radmenu by adding it to my VS.net 2005 toolbox from the RadControls Q4 .net2.0 bin folder, then dragging and dropping on my design view of my Masterpage.

    Looking forward to your assistance.

    Reply

  • Fredrick Zilz avatar

    Posted on Nov 23, 2005 (permalink)

    Still Doing something wrong:

    Aspx.vb

    <code> Imports Telerik.WebControls

    Partial Class IHMaster

    Inherits System.Web.UI.MasterPage

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    Dim Backgroundimage As String = ResolveUrl("~/images//top_border.jpg")

    bkgrndtop_border.Attributes.Add("style", "background: url(" & Backgroundimage & ");")

    Backgroundimage = ResolveUrl("~/images/left_Border.jpg")

    Table1.Attributes.Add("style", "background:url(" & Backgroundimage & ");")

    ' add menu structure to RadMenu

    Dim parentmenu As New RadMenu

    parentmenu.ImagesBaseDir = ResolveUrl("~/images/menu")

    Dim TopGroup As MenuGroup = New MenuGroup(parentmenu)

    TopGroup.Flow = PresentationDirection.Horizontal

    RadMenu1.RootGroup = TopGroup

    Dim TopItem As New MenuItem(TopGroup)

    TopItem.Image = "aboutus1.gif"

    TopItem.ImageOver = "aboutus2.gif"

    TopItem.Href = ResolveUrl("~/aboutus/aboutus.aspx")

    TopGroup.AddItem(TopItem)

    End Sub

    End Class

    </code>

    Aspx

    <code>

    <radM:RadMenu id="RadMenu1" runat="server" AccessibilityEnabled=true cssfile="~/images/menu/menu.css" >

    </radM:RadMenu>

    </code>

    it appears as though the imagebasedir is not working for my item image and imageover.

    I look forward to your assistance.

    Reply

  • Fredrick Zilz avatar

    Posted on Nov 23, 2005 (permalink)

    Sorry, my stupidity:

    I resolved my own error. this code works:
    <code>

    Dim TopGroup As New MenuGroup

    RadMenu1.ImagesBaseDir = ResolveUrl("~/images/menu")

    TopGroup.Flow = PresentationDirection.Vertical

    RadMenu1.RootGroup = TopGroup

    Dim TopItem As New MenuItem

    TopItem.Image = "aboutus1.gif"

    TopItem.ImageOver = "aboutus2.gif"

    TopItem.Href = ResolveUrl("~/aboutus/aboutus.aspx")

    TopGroup.AddItem(TopItem)


    </code>

    Reply

Back to Top

Skip Navigation LinksHome / Community / Forums / ASP.NET > Menu > Menu single level w/ rollover

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2010 Telerik. All rights reserved.