Groups | Blog | Home
all groups > dotnet windows forms designtime > november 2004 >

dotnet windows forms designtime : Custom Designer



Lee
11/2/2004 4:36:36 PM
I want to design a control that needs to have extra "handles" at design
time. Basically at design time I want my control to have a line coming off
of it that extends beyond the region of my control and ends in a "gripper"
handle (probably only when it is selected in the form designer). I want
the user to be able to grab the gripper handle and move it anywhere to
rotate the control as well as specify a distance from the control (by the
length of the line). The rotation of the control isn't a problem, but how do
I create a custom design time behaviour like that that can draw outside the
bounds of the control and allows my control to redraw itself (at design
time)?

-----
Lee

Lee
11/5/2004 2:26:00 AM
Anybody?

[quoted text, click to view]

joeycalisay
11/8/2004 9:32:23 AM
Adding additional painting on control at design time can be done by
overriding the OnPaintAdornments method of controldesigner class. I believe
you can even paint beyond the bounds of the control being designed. However
providing implementations for your gripper is kind of complicated in my
opinion. Forcing a redraw is as simple as invalidating the component that
your designer is using.

[quoted text, click to view]

Lee
11/8/2004 2:08:18 PM
Thanks! I think the ControllDesigner class is exactly what I was looking
for. I'll have to spend some time researching how to use that now. Again,
thanks! :)

-----
Lee

[quoted text, click to view]

AddThis Social Bookmark Button