Setting the active MdiChild/DockWindow of a RadDock

2 posts, 0 answers
  1. Jill-Connie Lorentsen
    Jill-Connie Lorentsen avatar
    118 posts
    Member since:
    Nov 2008

    Posted 15 Apr 2011 Link to this post

    I have a RadDock with several MdiChildren/DockWindows. When the user closes one of the tabs I want the focus to be set to the previously active tab.

    In the ActiveWindowChanged event I remeber the previous active tab. 

    I've tried both the radDock.ActivateMdiChild(Form) and radDock.ActivateWindow(DockWindow) methods

    What am I missing?

        bool exists = (Array.IndexOf(radDock.MdiChildren, _currentMdi) != -1);
        if (!exists && _prevMdi != null)
            _currentMdi = null;
            _currentDockWindow = null;
    _prevMdi = _currentMdi;                   
    _currentMdi = (Form) ((HostWindow) e.DockWindow).Content;

    _prevDockWindow = _currentDockWindow;
    _currentDockWindow = e.DockWindow;

  2. Nikolay
    Nikolay avatar
    1805 posts

    Posted 20 Apr 2011 Link to this post

    Hi Jill-Connie Lorentsen,

    Please find attached a sample project that follows your requirements. After you close a window, the previously activated window becomes active again. If this is not your requirement, please describe your scenario in greater detail. This will allow me to assist you further.

    All the best,
    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