Control Selection & Resizing at Runtime
-
Hi, I have a common mousemove/down/up handler for any control placed on the panel at runtime .It's Working fine . I need for moving and resizing controls (labels/textboxes/checkboxes/etc) and shape controls (LineShape ,RectangleShape, OvalShape which are from powerpacks.dll ) which i place on the Panel which are generated at runtime . Is there any Class for creating Control Selection and Resizing Handles for my controls which are present on the panel at runtime ?????? I want to show the selection if user presses the control and able to resize those controls with resizing handles for Any Typeof control (Textbox,Label,.... LineShape,RectangleShape ,OvalShape ) ???? If i release the mouse button after resizing it has to update the size or location of that control same like in vs2005 design time environment but here at runtime . plzzz , Thanks & Regards
For1206
-
Hi, I have a common mousemove/down/up handler for any control placed on the panel at runtime .It's Working fine . I need for moving and resizing controls (labels/textboxes/checkboxes/etc) and shape controls (LineShape ,RectangleShape, OvalShape which are from powerpacks.dll ) which i place on the Panel which are generated at runtime . Is there any Class for creating Control Selection and Resizing Handles for my controls which are present on the panel at runtime ?????? I want to show the selection if user presses the control and able to resize those controls with resizing handles for Any Typeof control (Textbox,Label,.... LineShape,RectangleShape ,OvalShape ) ???? If i release the mouse button after resizing it has to update the size or location of that control same like in vs2005 design time environment but here at runtime . plzzz , Thanks & Regards
For1206
for1206 wrote:
Is there any Class for creating Control Selection and Resizing Handles for my controls
No, there isn't. This functionality has to be built into the controls themselves, as well as some additional functionality added to the container you put them in. You're going to have to extend the existing controls classes (Label, TextBox, ...) to make your own versions that support being moved around at runtime as well as containter controls to add support for drawing handles and resizing. This is not something that can be explained in a few forum posts. It's rather complex and a bunch of points have to be covered to get basic functionality to work. You can learn more from these articles[^].
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Hi, I have a common mousemove/down/up handler for any control placed on the panel at runtime .It's Working fine . I need for moving and resizing controls (labels/textboxes/checkboxes/etc) and shape controls (LineShape ,RectangleShape, OvalShape which are from powerpacks.dll ) which i place on the Panel which are generated at runtime . Is there any Class for creating Control Selection and Resizing Handles for my controls which are present on the panel at runtime ?????? I want to show the selection if user presses the control and able to resize those controls with resizing handles for Any Typeof control (Textbox,Label,.... LineShape,RectangleShape ,OvalShape ) ???? If i release the mouse button after resizing it has to update the size or location of that control same like in vs2005 design time environment but here at runtime . plzzz , Thanks & Regards
For1206
Checkout this article: http://www.codeproject.com/KB/miscctrl/CSharpRectTracker.aspx[^]