I have been playing with the resizing options on a sample program to get a feel for how it all works and need a little guidance.
For practice, I took the Address Book sample program. What resize settings would be needed to properly resize the last name and first name fields. I have tried multiple combinations but none seem to give the desired results. Now if there is only one field per line, it seems to do ok. I am wondering if we might also need the ability to lock to the left side of the form, but then what would happen if there was 3 fields on a line???
Thanks,
Gary
I checked that out too, For that szenario you would need a resize rule that moves and resizes at the same time. The Net framework has something like that, where you can set anchors.
Probably quite difficult to automate.
Paul may expand them in the future. I had suggested the Proportional Size/Move being allowed together since they could sort of split the operation 50/50 and not cause the controls to step on each other when both Normal Size/Move make them grow too much. There is also the issue of which to do first- Size then move, or move then size, etc. Proportional options would handle this better.
Yes to handle all aspects will not be so easy. The solution we have now though does handle quite a few situations already very well. I am just now using it in some forms in my dispatch applications, and it proved to be helpful.
Quote from: Rolf Brandt on February 14, 2010, 04:07:06 AM
Yes to handle all aspects will not be so easy. The solution we have now though does handle quite a few situations already very well. I am just now using it in some forms in my dispatch applications, and it proved to be helpful.
Rolf,
I agree....what we have now is definitely a step in the right direction. I just checked RealBasic to see how it handled resizing 3 fields on the same line, and there are issues there as well. I have never been a RB fan, but it looked like the resizing options might be promising. It has 4 checkboxes to lock a control to any or all sides of a form, but I see the same issues when trying a test with 3 fields. The outer 2 fields are not too big of a problem, but the middle field overlaps the outer 2 when resizing.
I normally don't allow any forms that I design to be maximized, so resizing hasn't been a issue. I will probably stick with that philosophy ;)
Paul, GREAT BIG THANKS for the addition of setting multiple control properties in 3.07. A real time saver!
Gary
Just out of curiosity.....I think Lance Edmonds used to offer s Resize32.DLL that would resize a forma nd all controls. Any idea how he was doing this? I think I downloaded the trial version many moons ago and as I recall, it seemed like it worked pretty good. I think there were some controls that gave it fits, but for the most part it did pretty good.
Gary
Here is some nice resizing code:
ftp://ftp.pbhq.de/pbsource.win/ez-size.zip
I think its a great start for the short amount of time. Its not easy I'm sure. When I was using VB6 a lot the was a Resizer custom control I bought for $20 and you just dropped it on a form and that was it, no properties to set. It worked great no matter how you dragged the form around. I think in time this sort of thing could be built into FF3. It would just do it. The only setting would be on or off. Like I said, its a great start and is very useful. Great Job Paul.
Doug
KD5NWK
I very much welcome this new resizing feature. I have been playing with it, but have not completely figured it out yet.
I am not sure that it allows for every possible resizing need.
Years ago, I wrote some resizing code for myself (but can't seem to find it right now).
It had an extremely simple and powerful concept that could foresee in practically every resizing need.
The principle was something like this:
Since every control is normally defined as a rectangle, we are going to look
at every side of the rectangle separately and will define how this side has
to behave when its form is resized.
Defining how a side must behave is done by defining a separate 'constraint' for every side.
The constraints parameter was a string that consists of 4 parts, separated by commas:
- the 1st part: defines how to constrain the controls left side
- the 2nd part: defines how to constrain the controls right side
- the 3rd part: defines how to constrain the controls top side
- the 4th part: defines how to constrain the controls bottom side
So, a constraint parameter could look something like this: "FL,S,FT,F50"
What possible constraints are there?
a) SCALED
The position of the control side is changed, proportionally with the form width (or height) change.
For example, if a forms width is doubled, the controls left or right side x-coordinate is also doubled in value.
This is the simplest to define: for any one of the 4 constrain parts, you simply would enter a "s" (or "S")
b) FIXED
The position of the control side is fixed to one of the forms sides.
Let's consider the horizontal direction. You could define that the position of the left control side
must be fixed to the left side of the form, even when the form changes size. This is defined by the
constraint "FL": 'fixed to the left side of the form'. You could also fix it to the right side with "FR".
Same goes for the vertical direction and the top or bottom side of a control.
Let's expand this principle a little bit. In stead of fixing a control to one of the sides of the form,
why not allow it to be fixed to the center of the form (in horizontal or vertical direction)?
We can define the center of the form as lying at 50% of the forms width or height.
So, we could write something like "F50", to be read as: 'fixed to a point at 50% of the forms width
(or height)'.
Let's even further expand this concept. Why stop at 50%? Let us enable to fix a control at ANY point
in the form. For example at 10%, 20%, 80%,...
These constraints are written as "F10", "F20", "F80",... Since these reference points are defined as
percentages of the forms width or height, this reference point will move when the form is resized. But
the control remains fixed to this moving reference point! A very powerful concept that will likely be
able to fullfil all your resizing needs!!
Examples: FL : fixed to the left side of the form
FR : fixed to the right side of the form
FT : fixed to the top of the form
FB : fixed to the bottom of the form
F50 : fixed to a reference point at 50% of the forms width or height.
F80 : fixed to a reference point at 80% of the forms width or height.
PS. F0 equals FL or FT. F100 equals FR or FB, depending for which control side it is used.
Kind regards
Just want to add my 2 cents to the resizing dialog. It seems to work OK for some simple cases. But if you have several controls next to, or over, each other then there are many problems. They do not resize and reposition correctly. I think that this was a good start, but it needs more work. Fortunately, I know that Paul will perform his magic and deliver yet another miracle !!!
I know how difficult it is to develop quality software at a reasonable price. Personally, I would not be adverse to paying a little more for a "resize upgrade" if it works 100%.
Robert