How to programmably move a GroupBox in C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

There are no public events such as mouse down, mouse move and mouse up for
GroupBox in C#. It is possible to move a GroupBox programmably inC#?

Thanks

Minfu
 
You can call the SetBounds() operation on every control to set the size and
the location of any control.

Eg to move the groupbox to Location(100, 100)

GroupBox groupBox = new GroupBox();
groupBox.SetBounds(100, 100, 0, 0, BoundsSpecified.Location);

Gabriel Lozano-Morán
Real Software
 
Or off course set the Location, Left, Top properties but for some reason I
think that I am not understanding the question very well because you
mentioned the mouse events?

Gabriel Lozano-Morán
 
I mean to use mouse down , move up events to move it.

I think I know what you mean now. These events are marked with the Browsable
attribute set to false this means that you will NOT see them in the property
window. This however does not mean that you cannot use the events in code.

this.groupBox.MouseDown += new MouseEventHandler(groupBox_MouseDown);

Gabriel Lozano-Morán
 
Back
Top