This is a migrated thread and some comments may be shown as answers.

Setting the active MdiChild/DockWindow of a RadDock

1 Answer 160 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Jill-Connie Lorentsen
Top achievements
Rank 1
Jill-Connie Lorentsen asked on 15 Apr 2011, 02:16 PM

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;
          
        //radDock.ActivateMdiChild(_prevMdi);
        radDock.ActivateWindow(_prevDockWindow);
          
    }
 
_prevMdi = _currentMdi;                   
_currentMdi = (Form) ((HostWindow) e.DockWindow).Content;

_prevDockWindow = _currentDockWindow;
_currentDockWindow = e.DockWindow;

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 20 Apr 2011, 09:30 PM
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,
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
Tags
Dock
Asked by
Jill-Connie Lorentsen
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or