Promblem With RadTextBox - Context Menu

4 posts, 0 answers
  1. Andrés David Santacoloma Isaza
    Andrés David Santacoloma Isaza avatar
    51 posts
    Member since:
    Mar 2010

    Posted 31 May 2010 Link to this post

    Hello:

    I have a problem with the following code:

    Private Sub

     

     

    RadForm1_Load(sender As Object, e As EventArgs)

     

    tbGiftType.TextBoxElement.TextBoxItem.HostedControl.ContextMenuStrip =

     

    New

     

    ContextMenuStrip()

    tbGiftType.TextBoxElement.MouseDown +=

     

    New MouseEventHandler

     

    (TextBoxElement_MouseDown)

    LoadWrappingContextMenu()

    End Sub

    It's for quit the default context menu of radtextbox and put a context menu with my properties.
    Wath's the code for it?

    Thanks

    David.

  2. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 03 Jun 2010 Link to this post

    Hello Andrés David Santacoloma Isaza,

    You can replace the default context menu as it is shown below:
    Private Sub Form1_Load(sender As Object, e As EventArgs)
        Dim menu As New ContextMenuStrip()
        menu.Items.Add("Item1")
        menu.Items.Add("Item2")
      
        Me.radTextBox2.TextBoxElement.TextBoxItem.HostedControl.ContextMenuStrip = menu
    End Sub

    Let me know if you have any additional questions.

    Kind regards,
    Martin Vasilev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Andrés David Santacoloma Isaza
    Andrés David Santacoloma Isaza avatar
    51 posts
    Member since:
    Mar 2010

    Posted 12 Jun 2010 Link to this post

    Thanks, but my new contextMenu is a RadContextMenu and when i write:

    Me.radTextBox2.TextBoxElement.TextBoxItem.HostedControl.ContextMenuStrip = MiRadMenu

    it write the following error:

    Telerik.WinControls.UI.RadContextMenu can't convert in System.Windows.Forms.ContextMenuStrip

     

  5. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 17 Jun 2010 Link to this post

    Hello David,

    Thank you for getting back to me. 

    Please refer to this help article which concerns the process of assigning a RadContextMenu to Telerik or non-Telerik controls. Do not hesitate to contact me again if you have any additional questions.

    Greetings,
    Martin Vasilev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top