PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Gary Stout on November 16, 2009, 08:58:51 PM

Title: Resizing Forms with a designer option
Post by: Gary Stout on November 16, 2009, 08:58:51 PM
Paul,

I don't know if this is possible in FF or how hard it would be to do, but I will mention it anyway. I have 'played' with RealBasic a little looking for a Linux design platform, and it is 'ok', but there are enough things that I don't like about when compared to PB, that I never pursued it. That being said, there is a feature in the designer that I thought was very cool. In the properties window, you have 4 checkboxes (Lock left, lock top, lock bottom, and lock right), which locks a control to each side selected. When a form is resized with the minimize/maximize buttons, a particular control is bound to each side that is checked....so if you bind the control to all 4 sides, it will resize the controls accordingly or it could only be bound to the top and left side. Regardless, it looked like a cool property. This also works if a form is manually resized with the drag handles.
It seems like resizing has always been an issue in PB programs.

Thanks,
Gary
Title: Re: Resizing Forms with a designer option
Post by: Paul Squires on November 16, 2009, 09:10:57 PM
You must be reading the minds of several other users here.  :)

The automatic resizing suggestion has been made earlier. I have it on my to-do as a priority. Actually, it was one of the last remaining features that was cut prior to the end of beta testing. It is a complicated functionality but it will be very cool to have in FF3.
Title: Re: Resizing Forms with a designer option
Post by: Barry Marks on November 19, 2009, 01:27:09 AM
It would also be nice to be able to lock a control into it's position on a form.  I'm always bumping something somehow.

Barry
Title: Re: Resizing Forms with a designer option
Post by: David Kenny on November 19, 2009, 01:52:26 AM
Barry,

It's been around since FF2 (maybe FF1, but I don't remember).  It's called Lock Controls and is found at the bottom of the Format menu. It's an all-or-nothing option.  I usually bump something when trying to move or select something else so it's not of much use to me.

That's why I have already asked for Undo/Redo functionality on the Forms Designer windows. It would be quite useful to just Undo the 'bump'.

David
Title: Re: Resizing Forms with a designer option
Post by: Paul Squires on November 19, 2009, 10:55:55 AM
I notice that in Visual Studio 2010 (the beta version) that you can lock individual controls. Does that sound like a good idea to have? May not be too hard to implement.
Title: Re: Resizing Forms with a designer option
Post by: Haakon Birkeland on November 19, 2009, 12:26:44 PM
If for instance a FireLine square is used to outline other controls, it sounds to me like locking it would be a practical solution to avoid messing about with it when working on controls on top of it ...

I often do similar things in desktop publishing / drawing applications if an element is going to be a background, cause if I click and drag on it as if it was not there (to select elements on top of it), I would only achieve to move the "background" around.
Title: Re: Resizing Forms with a designer option
Post by: Gary Stout on November 19, 2009, 04:26:24 PM
Quote from: TechSupport on November 19, 2009, 10:55:55 AM
I notice that in Visual Studio 2010 (the beta version) that you can lock individual controls. Does that sound like a good idea to have? May not be too hard to implement.

a BIG YES! I hate to bring up the competiton here, but it does allow individual controls to be locked and unlocked or with a right click, all controls can be locked or unlocked. I usually lock all controls once I get things set and then manually unlock the one I need to tweak. VERY HANDY!

Thanks,
Gary
Title: Re: Resizing Forms with a designer option
Post by: Paul Squires on December 02, 2009, 11:12:27 AM
I have added a "Locked" property for all controls. Seems to be working pretty well so far. You can still lock the entire Form via the "Format" menu but now you have the option to lock individual controls.

The fix will be in v3.05.
Title: Re: Resizing Forms with a designer option
Post by: Gary Stout on December 02, 2009, 01:09:25 PM
Paul,

Thanks! Just curious....can individual controls also be unlocked without having to unlock all and possibly making unwanted moves?

I usually tend to lock the entire form when I have everything where I want it and then unlock individual controls if I need to tweak something.

One thing that is kinda handy in another designer  ;) is.....if the controls are locked, you can hold the CTRL key down and then left click the control to select it and move it via the cursor controls even when locked.
When the controls are locked the drag handles are red and when unlocked, they are green. When the CTRL key has been held and the control is selected, the drag handles are dark grey. Not sure if you have considered changing the drag handle color on locked controls.....or.....have you a different way of indicating when a control is locked/unlocked?

Keep up the excellent work.....this thing keeps getting better all the time.

Gary
Title: Re: Resizing Forms with a designer option
Post by: Paul Squires on December 02, 2009, 01:39:39 PM
Yes, you are right, individual controls can be locked and unlocked without affecting any other controls. However, if the "Lock Controls" is set for the entire Form ("Format" menu) then that setting will override the locked property value for the individual controls.

If a control is locked you will not be able to size or move it either by the mouse, the PropertyList, or by the keyboard shortcuts. Using CTRL or SHIFT for selecting the controls has specific meaning in FF so I am not sure that implementing the 'other designer' feature would be beneficial in this case. However, I do like the idea of showing the grab handles of locked controls as red. I will implement that idea.

Title: Re: Resizing Forms with a designer option
Post by: Rolf Brandt on December 02, 2009, 01:41:46 PM
QuoteOne thing that is kinda handy in another designer   is.....if the controls are locked, you can hold the CTRL key down and then left click the control to select it and move it via the cursor controls even when locked.

That sound like an interesting feature to me. I won't even mind if the controls are generally locked and you can move then only with the Ctrl-key pressed.
Title: Re: Resizing Forms with a designer option
Post by: Gary Stout on December 02, 2009, 01:46:17 PM
Quote from: TechSupport on December 02, 2009, 01:39:39 PM
Yes, you are right, individual controls can be locked and unlocked without affecting any other controls. However, if the "Lock Controls" is set for the entire Form ("Format" menu) then that setting will override the locked property value for the individual controls.

So, are you saying if they are locked with the FORMAT menu option, they won't be able to be unlocked individually with the right click or whatever method you have used to lock and unlock controls? If this is the case, it would still be nice to be able to unlock individual controls once all controls have been locked via FORMAT menu.

Also, thanks on the red drag handles  :)

Gary
Title: Re: Resizing Forms with a designer option
Post by: Paul Squires on December 02, 2009, 02:48:35 PM
I was thinking about this and I think that I will remove the restriction that controls can not be moved/sized by keyboard keys if they are locked. That will solve the problem. :)
Title: Re: Resizing Forms with a designer option
Post by: Roger Garstang on December 10, 2009, 05:00:10 PM
Yes, Keyboard moves while locked is fine.  That is how I did it in FF2.  I suggested the individual control lock before too, glad to see that one!  And, VS 2008 has the individual lock option.  Can't remember if 2005 did or not.
Title: Re: Resizing Forms with a designer option
Post by: Gary Stout on December 10, 2009, 08:22:46 PM
Paul,

I have the 3.05 preview version that I am using. Did you say that you were going to implement a way to lock/unlock individual controls? Actually, I just re-read the posts and it looks like you did do this. I am not seeing how to lock and unlock controls individually unless, because I am using the pre-view version, maybe its not there yet.
If it is in the pre-view version and I have over looked it, could you add the ability to lock and unlock from the right click menu?

Thanks,
Gary
Title: Re: Resizing Forms with a designer option
Post by: Paul Squires on December 10, 2009, 09:12:28 PM
Hi Gary,

You should be seeing a new property in the Property List called "Locked". If you are not seeing that property then you must not have the latest 3.05 preview. Also, in that download you need to ensure that you copy in all of the new *.ctl files for the custom controls. Those new files ensure that the "Locked" property is present for custom controls. When you set "Locked" to True then the grippers around the control turn Red.

Title: Re: Resizing Forms with a designer option
Post by: Gary Stout on December 10, 2009, 09:36:11 PM
Ok....it is there  ;) I had snooped around under the FORMAT menu and all I was seen was lock controls. So if the controls are locked with the FORMAT option, the property setting has no effect. That works!

Not sure how hard it would  be to add, but having a lock/unlock option on the right click menu would be handy. If you are tweaking or moving controls around on the form with the mouse, it is handy to right click and lock without having to go over to the property box. Either way is not a real big deal.... I guess I have just got used to the right click option in another designer ???

Thanks,
Gary