c# - How to pass mouse events to a WinForms control at design time? -
we have custom-made winforms grid control inherits standard control class. users can create columns @ design time using our custom verbs , interactive column collection editor, cannot resize created columns interactively @ design time using normal mouse actions (similar column resizing in windows explorer).
to allow - i.e. passing mouse input grid header when mouse pointer on area, overrode gethittest method of designer attached our control (inherits controldesigner). structurally looks following one:
protected override bool gethittest(system.drawing.point point) { if (ismouseingridheaderarea()) return true; else return false; }
all works expected while moving mouse pointer: column headers correctly highlighted @ design time user moving mouse on them, , mouse pointer changed double-arrow we-resize cursor when on column divider area. minor problem latter case cursor changed 4-arrow cursor indicates whole control can selected/moved (the standard behavior controls on form in winforms form designer).
when hold down left mouse button when column resizing can performed, nothing happens. whole grid control isn't moved on form.
how resolve issue?
Comments
Post a Comment