Hello, I know the Designer issue is quite unfamiliar, but I could use
all the help I can get.
I have 3 derived user controls, and 3 designers:
1. MyRootDesigner - which implements IRootDesigner.
2. MyControlDesign er - implements ControlDesigner .
The usercontrols are:
1. MyRootComponent - is assigned with the MyRootDesigner as designer
attribute.
2. MyControlCompon ent - is assigned with the MyControlDesign er as
designer attribute.
My question is regarding the selection frame I want to be drawn around
the controls at design time:
The MyRootComponent is created properly, and I use the
GetView method to receive the view of the form. I set the docking of the
view to Fill, and then I add this view (which Microsoft implemented as
"DesignerFrame" ) to the container of the MyRootComponent . This is all
fine and the selection is made properly.
The problems begin when I add MyControlCompon ent to MyRootomponent: this
is done through the MyRootDesigner: I add both the physical
MyControlCompon ent usercontrol and the view (again using the GetView
method) to the MyRootComponent usercontrol. From this moment on - only
the
added MyControlCompon ent controls get the selection frame when selected.
If their container (MyRootComponen t) is selected - no frame is drawn.
I have tried everything - I tried create "my own" DesignerFrame class
and draw a selection frame there, but it looks very bad. I tried to use
override of OnPaintAndornme nt() - didn't work. I tried to use the
SelectionChange event and add the view only of the selected component -
again - the frames were located badly.
Does anyone know how to make the designer frame work when there is
containment between the designed components?
Thanks, Naama.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
all the help I can get.
I have 3 derived user controls, and 3 designers:
1. MyRootDesigner - which implements IRootDesigner.
2. MyControlDesign er - implements ControlDesigner .
The usercontrols are:
1. MyRootComponent - is assigned with the MyRootDesigner as designer
attribute.
2. MyControlCompon ent - is assigned with the MyControlDesign er as
designer attribute.
My question is regarding the selection frame I want to be drawn around
the controls at design time:
The MyRootComponent is created properly, and I use the
GetView method to receive the view of the form. I set the docking of the
view to Fill, and then I add this view (which Microsoft implemented as
"DesignerFrame" ) to the container of the MyRootComponent . This is all
fine and the selection is made properly.
The problems begin when I add MyControlCompon ent to MyRootomponent: this
is done through the MyRootDesigner: I add both the physical
MyControlCompon ent usercontrol and the view (again using the GetView
method) to the MyRootComponent usercontrol. From this moment on - only
the
added MyControlCompon ent controls get the selection frame when selected.
If their container (MyRootComponen t) is selected - no frame is drawn.
I have tried everything - I tried create "my own" DesignerFrame class
and draw a selection frame there, but it looks very bad. I tried to use
override of OnPaintAndornme nt() - didn't work. I tried to use the
SelectionChange event and add the view only of the selected component -
again - the frames were located badly.
Does anyone know how to make the designer frame work when there is
containment between the designed components?
Thanks, Naama.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!