Designer issue, I'm stuck

5 posts, 1 answers
  1. neebs
    neebs avatar
    106 posts
    Member since:
    Apr 2007

    Posted 07 Nov 2010 Link to this post

    I have a radWinform application with a radmenu and a radpageview. Menu is docked to the top and pageview is docked to fill. Now I want to add a radToolStrip, in between the menu and the pageview. If I change the pageview to dock none, add the toolstrip and dock to top, then change the pageview to fill, it underlays the toolstrip. If I cut the pageview before adding the toolstrip, I get two errors saying Object reference not set to an instance of an object. I then paste it back and the docking is fine, however my two radSplitPanels that were on one of the pageviewpages are gone. Is there an easy way to accomplish this without rebuilding my form?

    Thanks, Steve
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 08 Nov 2010 Link to this post

    Hi,

    Even though you are experiencing this issue with Telerik Controls, you'll find the same problem in VS with all controls when trying to insert a new control inbetween two docked ones.

    In this case, I beleive you will need to remove all the controls, add the RadMenu first, docked to top. Then add the RadToolStrip, docked to top, then add the RadPageView, docked to fill.

    I've also had this issue many times with controls, and is behavious of Visual Studio.

    Hope this helps
    Richard

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 10 Nov 2010 Link to this post

    Hi Neebs, 

    How did you get on with this? If you need more help, just let me know. If you found the answer useful, please mark as answer so others can find the solution too. 

    All the best
    Richard
  5. neebs
    neebs avatar
    106 posts
    Member since:
    Apr 2007

    Posted 10 Nov 2010 Link to this post

    Hi Richard,

    Actually your solution should work, however the real problem was the exceptions being thrown when I cut the radPageView, and the subsequent loss of the radSplitPanels (and all controls contained in them) when I paste it back. Here is a much better solution that I found works in this case. Specifically, I originally had a configuration consisting of a radMenu docked to Top and a radPageView docked to Fill. I wanted to insert a radToolStrip between the radMenu and the radPageView. So I set the dock property on the radPageView to bottom. Then I resized it to create an empty space on the form. Then I added the radToolStrip, which was automatically set to dock to Top. Then I set the radPageView to dock to Fill. At this point I had everything in the proper order except the tops of the tabs on the radPageView were underneath the radToolStrip. Finally I right-clicked on the radPageView (not the page, but the control) and selected Move to Front from the context menu. This reoriented the radPageView the way I wanted it.

    Steve
  6. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 10 Nov 2010 Link to this post

    Hi Neebs,

    Glad you have this sorted, but actually, pasting them back in doesn't usually work for me. You actually need to create new instances of each control, re-bind etc. It's a pain, but I have experienced this many times with all sorts of controls in Visual Studio.

    All the best
    Richard
Back to Top
UI for WinForms is Visual Studio 2017 Ready