3 posts, 0 answers
  1. Santiago
    Santiago avatar
    18 posts
    Member since:
    Nov 2007

    Posted 15 Nov 2007 Link to this post

    Hi, I'm working with two monitors. When I move the treeview to the secondary monitor, the context menu of every node is displayed in the main monitor. It occurs too with the control demo installed with the components, so, I suposs that it's a bug.

    Another thing, text displayed in the context menu are not aligned. I change every TextAlignment of each item, but what are displayed at runtime is very different.

  2. Angel
    Angel avatar
    121 posts

    Posted 19 Nov 2007 Link to this post

    Hi Santiago,

    Sorry for the delay.
    1. Indeed there is an issue with the positioning of the context menus on multimonitor systems. It will be fixed for in upcoming releases.
    2. The layout of the menu items is done so that the container of the text and the image is not stretched to the whole width of the popup menu you see. This forces you to align the container instead of the primitives inside it. Here is sample code that aligns all menu items to the right of a menu element with the hint aligned to the left:


    for (int i = 0; i < this.radDropDownMenu1.Items.Count; i++)     
        RadElement imageAndTextLayout = this.radDropDownMenu1.Items[i].Children[1].Children[0];     
        imageAndTextLayout.Alignment = ContentAlignment.TopRight;     
        RadElement hintTextPrimitive = this.radDropDownMenu1.Items[i].Children[1].Children[1];     
        hintTextPrimitive.Alignment = ContentAlignment.TopLeft;     


    Dim i As Integer = 0    
    Do While i < Me.radDropDownMenu1.Items.Count    
        Dim imageAndTextLayout As RadElement = Me.radDropDownMenu1.Items(i).Children(1).Children(0)     
        imageAndTextLayout.Alignment = ContentAlignment.TopRight     
        Dim hintTextPrimitive As RadElement = Me.radDropDownMenu1.Items(i).Children(1).Children(1)     
        hintTextPrimitive.Alignment = ContentAlignment.TopLeft     
        i += 1     

    In the future, we intend to modify the layout and possibly the hierarchy of the drop down menu. Either way, the code given here will become incorrect. After we make these changes, you will be able to align the text in a simpler way than the one that is given here.

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft R3 2016 release webinar banner
  4. Stefan
    Stefan avatar
    2891 posts

    Posted 21 Mar 2011 Link to this post

    Hi Santiago,

    Please note that in Q1 2011 we have introduced a major upgrade of RadTreeView control, which is now virtualized and fully customizable. Feel free to download the latest release and try it out. For more information on our latest release refer to this blog post.
    Kind regards,
    the Telerik team
Back to Top