I would appreciate any input related to the use of Form and/or
Form|Control properties to achieve this big-picture description of my
desired functionality :
 >  Selection of image file on the left side of display using one form.
 >  Contents displayed in second form to right of first form.
    -  Second form should be as large as possible
       +  Not overlapping first form
       +  Not running off right edge if display.
    -  Orientation adjusts to image proportionally.
 >  Focus "remains", via SETFOCUS, on first form.

I have one form, fViewImageData, that contains a Directory Tree control
and a File ListBox control.  I have an OnClick EEP for the File ListBox
control, 'cidFileListBox', that calls another form, fViewImage.  That
form contains only a Variable Image control, cidVARImage, associated
with a variable, vFilename, which contains a filename assigned from the
cidFileListBox OnClick EEP.  fViewImage and cidVARImage just display the
contents of the bitmap file in vFilename.

All this works fine.  I have my directory and file data in a form on the
left-hand side of the display and at an OnClick of a filename, the
actual image-content displays in the form on the right-hand side.  I
will soon add Keyword functionality to the left-hand form,
fViewImageData, but first ...

I have photos of varying resolutions and orientations.  I want this
right-hand form to utilize as much of the remaining screen as possible
without overlaying the left-hand form, so that I can tell something
about the visual quality of the image; for example, the lower-resolution
images would begin to alias/pixellate and the higher would not.
However, many of the higher resolution bitmaps could easily "explode"
beyond the display edges, so I'm not trying to make it depend on
image-size (which is an attribute not available to us yet, unless
someone has written a new DLL/plugin to read jpg/png/bmp/etc file header
info, but maybe I should volunteer to do that.).

Both of these size-related bitmap"bookends" imply that I don't want to
re-size the right-hand form any more often than is absolutely necessary.
(For example, at a sufficiently-reduced display-size, a 320x200 bitmap
can look just as good as a 3200x2000 bitmap.)  This is a time-savings
issue.  With a good display and a large enough presentation of the
image, the resolution-quality assessment becomes easy, even if I don't
have the actual values for height and width.  However, if I (or anyone)
has to re-size 3000-or-more separate bitmaps in order to achieve this,
it's going to add a lot of time to the process.  However, I want to be
able to re-size when necessary; that's part of the reason for 2 separate
forms.

My thinking has been that I could set the TOP,LEFT x,y coordinates of
the right-side form and have the form and/or control
(fViewImage|cidVARimage) automatically adjust to use as much of the
display as remains on the right as possible.  That's probably the easier
part.  I would also like the right-hand form to adjust itself,
PROPORTIONALly, to the orientation/aspect-ratio of the image, so that
the right-hand form and control are "filled" with the bitmap.

I have been trying different values for several Form and Variable Image
controls, such as ALIGN, AUTOSIZE, PROPORTIONAL, but haven't yet
discovered the "magic formula".

Both forms are called with EDIT USING ... MDI AS ... and the focus
returns to the left-hand form, fViewImageData after fViewImage is
RECALCed.  cidVARImage, the only control on fViewImage, the right-hand
form, is currently ALIGNed to Client.


Thanks,
Steve in Memphis


Reply via email to