<p>I have a very specific problem using C# and a Windows MDI Form application.  I want to display two (or more) images to the user, a 'left' and a 'right' image.  The names of the images are concealed from the user, and then the user selects which image they prefer (this is part of a study involving medical image quality, so the user has to be blinded from possibly relevant capture parameters which might be revealed in the image name).  Instead of showing the actual names, substitute names like 'image 0' and 'image 1' (etc) are shown to the user.</p>

<p>Whenever I use the standard <code>MDILayout.TileVertical</code> or <code>TileHorizontal</code>, the images are loaded in reverse order.  For example, if I have image 0 and image 1, they are displayed </p>

<p>Image 1     Image 0</p>

<p>Three or more images would be something like</p>

<p>2 1 0</p>

<p>or</p>

<p>3 2</p>

<p>1 0</p>

<p>And so forth.  The problem is, my users are confused by this right to leftness, and if I have another dialog box that asks them which image is better (or to rate the displayed images), they always confuse the order of images on the screen with the order of images in the dialog box.  That is, if I just order the images 0 1 2 3 etc in a ratings dialog, they assume that image 3 as it's displayed is image 0 in the MDI parent window, image 2 is image 1, etc-- they read left to right, and the images are being displayed right to left.  If I reorder the tabs in the ratings dialog box to reflect the order on the screen, that just confuses them further ("Why is image 3 before image 2?") and the results come out in the wrong order, and are generally unusable.</p>

<p>So, how do I force the ordering of displayed windows using <code>MDILayout</code> in <code>C#</code>?  Do I have to do it by hand, or is there some switch I can send to the layout manager?</p>

<p>Thanks!</p>

[{'answer_id': 64104, 'author': 'Grokys', 'author_id': 6448, 'author_profile': 'https://Stackoverflow.com/users/6448', 'pm_score': 1, 'selected': False, 'text': "<p>Why are you using an MDI interface? Surely a single window with a TableLayoutPanel or similar providing layout would be more suitable. The only reason you'd want to use a MDI layout is to allow the users to move the windows, which as far as I can tell from your description of the problem isn't desirable anyway?</p>\n"}, {'answer_id': 64151, 'author': 'Fred', 'author_id': 177, 'author_profile': 'https://Stackoverflow.com/users/177', 'pm_score': 0, 'selected': False, 'text': '<p>Could you avoid this problem by (before displaying the images) you:</p>\n\n<ol>\n<li><p>Put the image references in a structure (array or similar).</p></li>\n<li><p>Have a recursive function build a reverse order structure (or reorder the original).</p></li>\n<li><p>Use the new reversed order structure to build your child windows as before.</p></li>\n</ol>\n\n<p>It would add one more layer but might solve your problem if no one finds the reverse layout order switch soon enough.</p>\n'}, {'answer_id': 64330, 'author': 'OwenP', 'author_id': 2547, 'author_profile': 'https://Stackoverflow.com/users/2547', 'pm_score': 0, 'selected': False, 'text': "<p>I strongly recommend following Groky's advice and using a single-form interface rather than MDI for this.</p>\n\n<p>If you must use MDI, you need to know that the MDI layout methods use the Z-order of MDI forms to determine where the forms end up.  For example, if image 2 is behind image 1, then image 1 will be on the left and image 2 will be on the right.  The most logical way to cause this to happen would be to load image 2's form, then image 1's form, then do the MDI layout.  You can also use the <code>ActivateMdiChild</code> method to put the forms in a particular order (activating one form puts the other forms behind it).</p>\n\n<p>It's complicated and error-prone, and I strongly recommend having a two-pane interface on a single form instead, but this will work.</p>\n"}, {'answer_id': 64865, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>Thanks Owen and Groky, but the Single-Form interface is just not going to work.  First, I already have the display code in the MDI format, so that rewrite would require a very, very large rewrite of the code.  It took me about three weeks to write the basics of the app a while ago; these aren't jpgs I'm showing here, these are DCM images, and each one is a good 30 mb, with a variety of support tools that I haven't seen outside of medical imaging.</p>\n\n<p>Second, some radiologists don't like split screening for image comparison, and others require it.  As such, to accommodate both kinds of users, I set this up with tiling, but then the user can maximize images and then switch between them.  So, MDI is the right approach for that differing set of tastes; a single interface with a very complicated set of tab controls just sounds like a nightmare compared to an already extant and (for the most part) working system.</p>\n\n<p>However, since I do control the way in which images are displayed, I can force the z-ordering, and then that should work, right?   That's the basis of Fred and Owen's answers, if I'm reading them properly.  The user enters 'evaluation mode', and then the program loads the images, shows them, and only once the user has entered an evaluation are the images closed.  Given that constraint, I can probably enforce a particular z ordering (maybe by looping from length to 0 rather than from 0 to length).</p>\n"}, {'answer_id': 68088, 'author': 'Fred', 'author_id': 177, 'author_profile': 'https://Stackoverflow.com/users/177', 'pm_score': 1, 'selected': False, 'text': '<p>Another idea would be to put the actual rating mechanism at the bottom of each child window.  So the answer is actually attached to the picture on their child windows instead of having the answers in their own area.</p>\n'}]
['https://Stackoverflow.com/questions/64029', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']