RadButtonElements containing links to URLs

3 posts, 0 answers
  1. keith robideau
    keith robideau avatar
    6 posts
    Member since:
    Sep 2009

    Posted 15 Oct 2009 Link to this post

    Is there an example of this (VB or C#) found anywhere on this site? I seem to be coming up short. I've been learning .net / vb for the past year, but have not had the privilege of coding such an object to date.

    We're looking to deploy an organizational-wide (internal) radRibbonForm that would basically be deployed as a floating toolbar for users to gain quick access to internal resources.

    The RibbonTab is a great high level way for user to navigate topic, and then within each tab, the RibbonBarGroup contains relavent DropDownButtons, which of course contain ButtonElements...

    When I click the buttonElement, I get a 'Win32Exception was unhandled' error.

    Here's an example of a particular Button Element's code:


    Imports System.Web  
    Imports Telerik.WinControls.UI  
    Partial Public Class RadRibbonForm1  
        Private Sub rbeD1CPT_Click(ByVal sender As ObjectByVal e As EventArgs) Handles rbeD1CPT.Click  
        End Sub 
        Public Sub buttonClickEvent(ByVal sender As ObjectByVal e As EventArgs) Handles rbeD1CPT.Click  
            Dim rbeD1CPT As RadButtonElement = TryCast(sender, RadButtonElement)  
            System.Diagnostics.Process.Start("iexplorer.exe"DirectCast(rbeD1CPT.Tag, String))  
        End Sub 
    End Class 

    Any assistance would be greatly appreciated (I can post the *.designer.vb if it will help..)


  2. keith robideau
    keith robideau avatar
    6 posts
    Member since:
    Sep 2009

    Posted 15 Oct 2009 Link to this post

    i cleaned up the code and got this to work.

    now i'm wondering how to re-size the button elements. i am doing it in design-time, but the button dropdowns seem to default back to original size when viewed in debugging.

  3. Nikolay
    Nikolay avatar
    1805 posts

    Posted 20 Oct 2009 Link to this post

    Hi keith robideau,

    This first issue that you had was not related to RadControls for WinForms. The exception that you got is because of the way you are using the Process.Start() method. The fileName parameter should contain the full path to a file plus the filename itself. In your case the Process.Start will look like this:
    System.Diagnostics.Process.Start("C:\Program Files\Internet Explorer\iexplore.exe", "http://www.google.com")

    As to your second question, in order to resize RadButtonElements at design-time you should set their MinSize/MaxSize properties

    I hope this helps. If you have additional questions, feel free to contact me.


    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top