Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to allow user to resize controls

Status
Not open for further replies.

cavesdn

Programmer
Dec 16, 2000
5
US
How do I allow a user to resize controls on a form like we do in VB?
 
Could you clarify what you want to do a little more?

Do you mean allow the user to resize a control like you might as a 'developer' in design mode on a form?.

If you do I expect you could either mimick the windows process (with the little squares), which sounds horribly complicated....or

Perhaps allow the user to right click on a control, give them an option to 'Size this control', then setting a flag which stays set until the user selects 'Finish sizing this control' or until the control loses focus. Whilst the SizingFlag is set you could trap any ctrl-cursor or alt-cursor keypresses and change the size of the current control.

I mentioned the ctrl or alt keys because you may also want to allow the user to move the control also.

All this sounds like a lot of hard work. Could you not resize control to fit the size of the window and allow the user to change the size of the form.....or

Write an auto-resize routine for the control to take as little or as much space as YOU want. Give the user the option of resizing on demand (you could even give them different type of resize...i.e. Small, Large, Wide, Tall, Narrow etc.

Regards
Kirk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top