Need "Quick Help" guideance to convert existing form to be re-sizable

Started by John Montenigro, June 16, 2014, 05:13:37 PM

Previous topic - Next topic

John Montenigro

I have a FF program that now must be resizable. The form contains 13 textboxes (with their labels), one Option Group with 4 buttons, 2 combo boxes, one ListView, and 6 command buttons.

I'm running FF3.70 or FF3.71, and I know about the Resize options in the Workspace.

I know I can Select ALL and set them all at once to "Enable Resize", but I'm not sure about the use of Fixed side vs Scaled.

Anyone have any general guidelines they've settled on? What's better to set one way vs another?

-John

Eddy Van Esch

John,
It simply depends on how you want the controls to behave during resizing.
Every control is basically a rectangle and with the resize properties you specify how each of the 4 sides of the rectangle behaves.
You can fix the side or scale the side.
For example the leftmost vertical side of a textbox, you can fix it to the forms left or right side (top or bottom wouldn't make much sense). With 'Fix custom' you can fix the textbox side to any point of the forms width. For example 'Fixed custom 50%' would fix the textbox side to the middle of the form.
With 'Scaled' the textbox side moves proportionally to the width of the form.
It is harder to explain than it really is.
I would say: Decide how you want every control to behave, then see what the resize setting should be to accomplish that.
You can achieve pretty much any resizing behaviour that is thinkable. 
Eddy

Eddy Van Esch

Specific for textboxes, I would set both the horizontal sides of the textbox 'Fixed' to the top of the form. That way, the textbox height remains fixed also. The leftmost vertical side could be Fixed to the forms left side. The rightmost vertical side of the textbox then could be scaled.
But as said, it all depends on the whole layout and your personal preference.
Eddy

John Montenigro

Thanks Eddy,
Trying to figure out in advance "how you want every control to behave" is where I'm stuck -- not sure what various behaviors look like...

So, I'm just going to jump in and experiment. I've been fearful that I'd wreck my layout, which took a long time to tweak to perfection (according to the customer).

I suppose I should state the problem I'm trying to solve... The original screen/layout was intended for use on desktop/workstations, which have full-screen monitors.

But now the program is being used on a netbook with a much smaller screen, and some of the command buttons are not accessible. (Yes, I have carefully set the Tab Order, but the user's netbook doesn't recognize the off-screen controls.)

Thus, the need to allow resizing...

In the meantime, I created a menu that duplicates the inaccessible command buttons, so the user is able to work, although not as fluidly.

OK, jumping into the abyss! I'll report back on what I learn.
-John

Eddy Van Esch

Quote from: John Montenigro on June 17, 2014, 11:03:35 AM
"how you want every control to behave" is where I'm stuck
I suggest experiment a little with a dummy form with some controls on it so you don't mess things up  :)
Or otherwise copy the project or form.

Would it be an option to divide all the controls over 2 or more tabs? Or do all the controls have to be accessible at the same time?

Or maybe make the form scrollable? That would probably require a child form or even a MDI form ..
Eddy

David Kenny

It would be helpful to see a screen shot of the form in question. 

Most programs don't resize command buttons, but do move them.  So you would lock left and right sides of the control to the same side of the screen.  Usually the one it starts out next to.  Same with the top and bottom.  Lock both sides to either the top of the screen or the bottom.  Normally Check Boxes, Option Buttons, Text Boxes(You might allow a Text box to grow wider, but not taller - unless it's multi-line), Labels, etc. don't change size.  There are, of course exceptions when it makes sense.

Other controls make more sense to grow in size when the screen grows.  Listboxes (sometimes just in the vertical), ListViews, Grahpic controls, Picture Boxes, etc.  In that case you normally lock it to the vertical side and horizontal side that it is closest to, and let the other side be locked to the side the control is not closest to.

It sounds like you might also need to set a minimum size.  I usually like to design my Form at it's minimum size and set the minimum to that in Firefly.  Then, in the create routine, you resize the form to the size you would like it to start out at (it happens before the form is actually displayed so the user never sees the smaller form).  Designing it at it's smallest lets you know what size the controls will either get too small or start to run over the top of each other.  If your program saves the size and screen location it was at when it was closed last, you can also resize it back to that at creation time.



Eddy Van Esch

Eddy