Can I have a scrolling MDI client area? (OpenInsight Specific)
At 20 APR 1998 12:11:13PM Oystein Reigem wrote:
(Don B - if you read this you'll remember helping me brainstorm hierarchical interfaces last year, but I haven't had opportunity until now to try it out.)
I want to display hierarchical information. One simple example: Window A shows info about a collection of museums objects, window B info on a subcollection, window C info on a sub-subcollection, and window D info on one particular object in the sub-subcollection. The problem is that not everything will fit on the screen. The windows need to be almost half-screen size, but on the other hand the users only need to see two adjacent levels at the same time, e.g window B and C (tiled).
I have decided to use an MDI interface. The child windows will be wide and of equal size. At any time two (or fewer) child windows will be visible, tiled above each other (or what the Sys Ed calls "stacked") (in the example above B and C will be visible). The other windows (in the example that will be A and D) I can somehow hide (e.g by setting their coordinates to Spitzbergen or something). But I thought it would be nicer if I could have a larger, scrollable client area instead, containing all the open child windows. I have experimented a little bit, but I haven't figured out how to set coordinates and control scrolling. It seems when I put a child window at some location OI disregards the scroll of the client area and just puts it relative to the frame. Also I want to control the scroll in discrete steps (one child window height).
Have somebody tried something similar?
- Oystein -
At 20 APR 1998 12:23PM Blaise(Revelation) wrote:
Oystein,
Let me first make sure I understand you correctly. You want to have 4 windows open on an MDIFrame cascaded? You mentioned that you will only need 2 open at a time but there will be a total of 4 windows. Can you correct me if I am wrong or if you think I am unclear.
As far as the scrolling is concerned, the MDIFrame will make scroll bars available when any MDIChild form is off the client area.
With regards to positioning of the MDI children, you can center the MDIChild, or you can manually position it where you want it to go.
Let me know what I can do.
Good Luckā¦
Blaise
At 20 APR 1998 01:11PM Oystein Reigem wrote:
Blaise,
I want to have several child windows open, stacked above each other, edge to edge, sort of like a tower of bricks seen from the front. And I want them to stay edge to edge. All the child windows will have the same height, and the height is slightly less than half the screen height. If I have more than 2 windows open the total height will exceed the screen height. I want to look at these windows in some kind of scrollable area - the MDI frame client area - with a size (height) exactly double the window size (height), so I can see exactly two child windows at a time. Let's say I now have 4 child windows stacked above each other, named (from the top) A, B, C and D. I want to have a scroll bar (or something similar) so I can change between looking at window A and B, window B and C, and window C and D. Furthermore I want to scroll in discrete steps. I don't want to see half child windows.
I want it to work exactly like a list box with two visible lines and a vertical scrollbar. If the list box has 4 lines A, B, C and D you can scroll so that you see two adjacent lines at a time. So I want my MDI frame to be this large list box where I can display - not a list of text lines, but a list of child windows.
Furthermore I want to dynamically change that list of child windows. E.g I want to be able to add a new child window at the bottom. E.g I want to be able to remove the window at the top and put a different window there. So I (my handlers and SPs) need to be able to place child windows at certain locations (coordinates). But that doesn't work as I expect.
Let's say the MDI client area shows B and C. A is there too, but scrolled so I cannot see it. Let's say I want to exchange a new window AA for A. I thought I should put AA at 0,0, but then it covers B. So maybe I should scroll the MDI client area first? But then the question is: How do I do that?
- Oystein -
At 20 APR 1998 02:03PM Don Bakke wrote:
Oystein,
The problem with the MDI client scroll bar is that it doesn't respect "whole" windows therefore there is no natural to get it to line up the next window cleanly just by having someone clicking or dragging on the scroll bar itself. Your best bet is to avoid displaying the scroll bar and place up/down buttons on the MDI frame itself. These buttons would then bring to view the necessary windows.
This will also simplify where you position each subsequent MDI child window. My suggestion is to keep MDI child windows invisible until they are needed. When they are needed, you'll only need to display them in one of two areas (i.e. top window position or bottom window position.)
Come to think of it, if you still wanted to employ a scroll bar, just keep the MDI client scroll bar out of the picture and put a scroll bar control on the MDI frame in its place. It will easy for you to change its properties to account for the "true" number of open MDI child windows (visible and invisible) and then perform the same functions as the "up/down" buttons I referenced above.
dbakke@srpcs.com
At 21 APR 1998 06:20AM Oystein Reigem wrote:
Don/Blaise,
The problem with the MDI client scroll bar is that it doesn't respect "whole" windows therefore there is no natural to get it to line up the next window cleanly just by having someone clicking or dragging on the scroll bar itself.
Well, I already thought of solving that with what you suggest below - to use a separate VSCROLL, that I can set to the exact number of discrete steps I need at any time. (I've used that earlier in a window that shows a 2D array of thumbnail images. With the VSCROLL and a handler that sets the BMPs I simulate scrolling a larger array of thumbnails - the result set from a query.)
Your best bet is to avoid displaying the scroll bar and place up/down buttons on the MDI frame itself. These buttons would then bring to view the necessary windows. This will also simplify where you position each subsequent MDI child window. My suggestion is to keep MDI child windows invisible until they are needed. When they are needed, you'll only need to display them in one of two areas (i.e. top window position or bottom window position.)
You're probably right. I cannot really find any fault with that suggestion.
But I have had some limited success with my original strategy. So - in the name of scientific curiosity (and also because I might need it for something else later):
I think I can put a child window where I want. E.g if I have two child windows open, with the first at location (0,0), I can put a new one at the top by using a negative y value. But the MDI client area scrollbar doesn't update to reflect the new situation - not until I've clicked it at least once.
I can also close windows, but again the MDI client area scrollbar isn't updated until I click the scroll bar.
Thirdly, I can operate the MDI client area scrollbar from a handler by changing the VPOSITION property, but the area itself doesn't scroll so it's no use.
Is there some crucial thing I've forgot, like some message to tell the other part (i.e, client area vs scroll bar) to update itself? Or is there a bug - a faulty connection between OI's MDI client areas and their scrollbars?
Come to think of it, if you still wanted to employ a scroll bar, just keep the MDI client scroll bar out of the picture and put a scroll bar control on the MDI frame in its place. It will easy for you to change its properties to account for the "true" number of open MDI child windows (visible and invisible) and then perform the same functions as the "up/down" buttons I referenced above.
- Oystein -
At 21 APR 1998 09:09AM Blaise(Revelation) wrote:
Oystein,
What you want to can be done with OI. I'm am testing some stuff here using Windows API calls. I'll let you know what I find and post my results.
Blaise