SDI w/ splitter - SetActiveView()???
-
I have an SDI app with a splitter and two views. The left view is a tree view and I'm trying to make the app come up with the last selection visible/active. The menus/toolbars are indicating that the view is active but the focus/selection mark in the tree control acts as if it is not the active view. Part of the problem may be that the EnsureVisbile() call doesn't actually make it visible (the selection is hidden under a scroll bar). I don't know if that is what is causing the trouble or if the fact that the view really isn't the active view (in terms of mouse, keyboard) is why they EnsureVisible() isn't working (the chicken/egg thing). I'm using a timer in the MainFrame and forcing the active view after 300ms using SetActiveView(). Is there something else I should be doing to make the view act as if I just clicked on the item? Any idea why the EnsureVisible() isn't placing the selected item within sight? Thanks.