Hello Bart,
In the MicroDesigner template project, created when you create a new MicroDesigner project, there is a class called SectorAdornment. This is a good example of what you are trying to accomplish.
The cursor is set via the MouseOverCursor property in the constructor. The StateActivated property selects your custom State (you must have a custom State):
- Code: Select all
public SectorAdornment()
{
InitializeComponent(); // required by the designer
// set the name of the State activated by a mouse down and drag on this
// SectorAdornment
StateActivated = "ChangingAngle";
// set the Cursor used on a mouse over
MouseOverCursor = System.Windows.Forms.Cursors.Cross;
SetBoundsCore(new FRectangle(0, 0, 100, 100), BoundsChanges.All);
}
Please see ChangingAngleState for a custom state example.
The problem may be that you are doing too much with a single Adornment. In general, for your situation, you want to have an additional adornment, that is, in addition to what is already there, not a change to any selection adornment.
If your adornment can only trigger your custom State, there is no way it can move objects, unless your State does that.
To control which adornments are created, see the CustomAdorner class as an example. It adds an additional adornment for one type of object.
Regards,