RadTitleBar Configuration

8 posts, 0 answers
  1. Sperduti
    Sperduti avatar
    16 posts
    Member since:
    Oct 2007

    Posted 10 Dec 2007 Link to this post

    I place in my form an RadTitleBar.

    I have two questions.

    First, when I do right-click on the title bar, I see a context menu in English language. How can I do to see it in French ?

    Second, how can I connect event when I click on an element of the titlebar context menu ?

    Best regards,

    YSP
  2. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 11 Dec 2007 Link to this post

    Hello Sperduti,

    Thank you for writing.

    You must change the menu text manually. The context menu can be accessed through the ContextMenu property of RadTitleBar. Refer to the following code:

    this.radTitleBar1.ContextMenu.MenuItems[0].Text = "My Item Name"

    In order to attach an event to some context menu item use this code:

    this.radTitleBar1.ContextMenu.MenuItems[0].Click += new EventHandler(item_Click); 
    void item_Click(object sender, EventArgs e) 
        MessageBox.Show("Item clicked"); 
     

    Don't hesitate to contact us if you have other questions.
     

    Best wishes,
    Jack
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Sperduti
    Sperduti avatar
    16 posts
    Member since:
    Oct 2007

    Posted 11 Dec 2007 Link to this post

    Thanks,
    YSP
  5. Claude IMBERT
    Claude IMBERT avatar
    68 posts
    Member since:
    Oct 2006

    Posted 14 Apr 2010 Link to this post

    Hi,

    In the RadTitleBar,
    I want to change the actual context menu with an RadContextMenu. How can I do that?

    Regards
  6. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 16 Apr 2010 Link to this post

    Hello Claude IMBERT,

    Thank you for the question.

    If you are interested in the RadTitleBar control, you can easily show a RadConextMenu on it by using RadContextMenuManager. For additional information about this approach, please refer to this article.
    In addition to the steps provided in the article, you need to set the ContextMenu property of RadTitleBar to null.

    If your question, however, concerns RadTitleBar in RadForm, the approach is a bit different. You need to extend the RadForm class by overriding WndProc and showing RadConextMenu if the message is
    WM_NCRBUTTONUP. I am attaching a sample project to demonstrate this approach.

    If you have additional questions, feel free to contact me.

    Regards,
    Nikolay
    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.
  7. Claude IMBERT
    Claude IMBERT avatar
    68 posts
    Member since:
    Oct 2006

    Posted 20 Apr 2010 Link to this post

    Hi Telerik Team,

    Thanks for your solution, It helped me a lot.

    But I have still a question :
    When I minimize my application, I see the context menu in English and I want it in French.
    You can see my problem in the attachment.

    Regards
  8. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 22 Apr 2010 Link to this post

    Hi Claude IMBERT,

    Thank you for getting back to me.

    You can replace the default context menu of the Operating System, by extending RadForm and overriding the WndProc method. If the message is WM_POPUPSYSTEMMENU, you should create and show your own conext menu. This is demonstrated in the attached sample project.

    Kind regards,
    Nikolay
    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.
  9. Claude IMBERT
    Claude IMBERT avatar
    68 posts
    Member since:
    Oct 2006

    Posted 22 Apr 2010 Link to this post

    Hi

    Thanks a lot for your help, it is completely solving my problem.

    Regards
Back to Top
UI for WinForms is Visual Studio 2017 Ready