Two Minute Tutorial #4 — Form Positioner
22 May
Here’s a little look at the Form Positioner in the VCL Designer.
How many of you knew you could size that little thing?
Here’s a little look at the Form Positioner in the VCL Designer.
How many of you knew you could size that little thing?
Nick, this doesnt have anything to do with your post, but what happend to the Delphi hour?
May 22nd, 2007 at 4:25 pmGood demo, and ya, had no idea it could do anything but lurk in the corner.
A few design thoughts:
1. Why would I need to restart the IDE just to set a simple visible property?! Heck, you could add a toolbar button that could toggle this so that we could show/hide it on the fly.
2. It would be nice if I could right-click on the position designer and get the enumerated Position options (poDesign, poDefault, poScreenCenter, etc etc)
3. You did say double click right? I found a single click off the white form portion of the position control was enough, and double click would do nothing (open then hide so fast it looked like nothing anyways)
4. The "zoomed" view is very quick to disappear on mouse exit. I would prefer it to be more of a state toggle, I’m betting if you ask around, you’ll find others that feel the same way.
#2 is probably most important to me. I pretty much NEVER leave a form’s position to default. Almost all my forms are screen center, or I use code to save and restore its position from last use (usually defaulting at screen center <grin>)
May 22nd, 2007 at 4:40 pmI did realise that it did this stuff, but only through chance, when I accidentally resized it. Maybe you should change the cursor type to resize when the mouse moves over it. Or perhaps a resizing handle should appear, or maybe just adding ‘Click and drag to resize’ in the hint would help.
May 22nd, 2007 at 6:16 pmUseful information. I agree with the comments above.
Please get the audio level raised - I could only hear about 50% of what was said.
Thanks for offering these Two Minute Tutorials!
David
May 22nd, 2007 at 11:16 pmThe usefulness of this ‘form positioner’ thingie totally escapes me.
Why would anybody want to fix form position somewhere randomly on the desktop? From the design side, this is a total stupidity - you either want you form full-size, somewhere on the edge, in the center of the current window or desktop (and Delphi _can’t_ handle the latter), in the position before program restart or positioned ‘randomly’ by the Windows. Setting form to 123,321 (or whatever) is total nonsense.
And I’m not even mentioning the fact that position is not stored as percent of the screen size. If you use form positioner on a high-resolution screen and then run program on a low-res machine, you may not even be able to see the form. That’s why precise positioning is done in software, not in the designer.
I have developed a blind spot for the form positioner in last year. I don’t use it and I don’t notice it anymore.
May 23rd, 2007 at 12:40 amDavid Howes -> Excellent point on the mouse cursor change, that would make it easier to notice.
Primoz -> In house stuff can be absolutely positioned with much more freedom than general public apps. Also, if you are going to custom set the form location in code, you pretty much always have to have that flag set to poDesigned, or the vcl tends to get "helpful" and screws up your custom positioning.
That said, I can’t remember the last time I deliberately positioned a form and left it that way, but at least I have the option if I so desire.
Screen Center is probably a more sane default, but then, it’s too late to change it. When it was original chosen, screens weren’t usually more than 800×600 and most were 480×640, so absolute positioning made sense then. Still, probably a lesson about lack of forsight there somewhere…
May 23rd, 2007 at 12:55 am@C Johnson: Yes, but you cannot ‘absolutely’ position your forms with form positioner - you can only ‘approximately’ position them.
May 23rd, 2007 at 1:00 amNick,
Great these small tutorials. Just one small comment - the sound is way to low. I have to use my headphones to hear what you say. Please normalize the soundtrack before publising.
Thanks
Anders
May 23rd, 2007 at 5:40 amI never understood the usefulness of the positioner either. I said this during beta testing.
I thought the positioner would position the visible portion of the form under design in the IDE design window like modeling tools do when navigating large models. Given how much has been added to the IDE, the visible form design area has shrunk. Your form size can easily exceed the visible designer area. Using the positioner to give a bird’s eye view to move around the form area you see in the designer would be MUCH more useful. As is now, I turn the positioner off. Not worth displaying.
As a developer, you have to ask yourself, "How often do I set the initial position of a form?" Ok, every once in a while. Now asks yourself, "How often do I have to move around large forms when designing them, especially in laptop resolutions?" Often, especially if you like to keep IDE panels up by not hiding them.
May 23rd, 2007 at 8:46 amPrimoz -> Close usually counts. Most people aren’t pixel perfect obsessed… In the top left corner somewhere usually makes them happy. Or in the top right, bottom left, whatever of a certain resolution. Chances are if you do use it, you don’t need perfection.
When doing a few slap together test apps, it would certainly be enough to get everything on the screen, more or less not overlapping at run time so you don’t have to keep redragging stuff around.
Like everything else in the toolbox, it isn’t a solution to everything. It has its role.
The same might be said over nail guns. You probably will never need one, but that is certainly no reason not to build them, and if someone gives you one for free, certainly no reason not to keep it in your garage… Just in case, ya know?
May 23rd, 2007 at 2:57 pmHow many of you noticed the little gem that loaded when Nick booted his D2007?
May 24th, 2007 at 4:37 am@Malcolm
Do you mean the ResEd gem? Very interesting…
http://www.theunknownones.net/
May 29th, 2007 at 9:03 am