Modal form resize

Started by Jim Short, November 08, 2012, 11:10:01 AM

Previous topic - Next topic

Jim Short

I have a modal form with a list and grid. I allowed resizing and made height larger.  Form loaded in AutoCAD remembers setting from before, (registry?), appearing smaller than new minimum height set in design.  Touching the corner causes form to jump to new size. How can this be made more seamless?

Jim
Jim Short

owenwengerd

What exactly do you mean by "more seamless", and to what are you referring?
Owen Wengerd (Outside The Box) / ManuSoft

Jim Short

It was hard to say the first time so don't get your hopes up. :)

The form had previously been used with allow re-sizing false.
After I had allowed re-sizing and made it taller and set the minimum height the same as the form height,
the form initialized at the old height rather than the new height set in design.

Touching the corner of the form as if one were going to re-size it, caused
the form to suddenly take on the new minimum height set in the design. 
Is it true that the forms current size at runtime is saved in the registry?

Why didn't the form obey the minimum height?
Jim
XP Acad2K4 ODCL 7.0.0.6
Jim Short

owenwengerd

Ok, I think I understand the question. The reason I asked you to clarify is because I wasn't sure if your complaint was about your experience or an end user's experience.

Setting a minimum height does not mean the form cannot be smaller; it means the user cannot drag resize it smaller. You can still resize it smaller via code, or in this case, because the saved size is smaller. By design, a resizable form's initial size is set to whatever was saved in the user's profile from the previous time the form was displayed.

In other words, what you describe sounds to me like it's working as designed. You experienced an unexpected behavior when you went to resize it the first time, but you're the developer and you routinely make changes that have unexpected side effects. As long as your end user doesn't experience such behavior (and they won't unless you increase the minimum size between invocations of the form), I don't see any actionable problem.
Owen Wengerd (Outside The Box) / ManuSoft

Jim Short

Thanks,
Its clear to me now.
Jim
Jim Short

Jim Short

Since the form size is being remembered, I can not get it to initialize to the size I want. Where is the user profile containing the old size stored at in XP? How can one change the size in design and get that size to be the size displayed at runtime. When the form is being resized by the user (me), it does not redisplay at that new size.
Jim Short

Jim Short

Sorry for wasting our time,
OnIinitialize is handling size and I forgot to look there.
Jim
Jim Short