R
Rico
Hi,
I have about a weeks worth of VB .NET experience under my belt and have run
into
something that I can't fix :-(
I have a form and it has a click event handler attached. The user clicks the
form and the handler adds a control (selected from a simple palette) to the
form at the place where they clicked. One of the controls is a box which I
sub-classed (is that the right phrase?) form a windows form control by
over-riding the paint method to draw a box with a label in the top left
corner.
When this box gets added to the form, a click handler is also added so that
the user can select it later on to change it's properties. I'm building a
bespoke UI designer here. Here is where I have a problem. If I create a box
and want to place a button on top of it the click handler for the box is
called (correctly because I clickeed the box). What I want is to call the
click handler for the Form - to add a new control to the form - instead.
Can somebody point me in the right direction please?
Can I resize the click-able portion of the box so that it is just the label
and not the entire range?
Can I force the click event to bypass the box and go to it's parent (the
Form)?
Thanks,
Richard.
I have about a weeks worth of VB .NET experience under my belt and have run
into
something that I can't fix :-(
I have a form and it has a click event handler attached. The user clicks the
form and the handler adds a control (selected from a simple palette) to the
form at the place where they clicked. One of the controls is a box which I
sub-classed (is that the right phrase?) form a windows form control by
over-riding the paint method to draw a box with a label in the top left
corner.
When this box gets added to the form, a click handler is also added so that
the user can select it later on to change it's properties. I'm building a
bespoke UI designer here. Here is where I have a problem. If I create a box
and want to place a button on top of it the click handler for the box is
called (correctly because I clickeed the box). What I want is to call the
click handler for the Form - to add a new control to the form - instead.
Can somebody point me in the right direction please?
Can I resize the click-able portion of the box so that it is just the label
and not the entire range?
Can I force the click event to bypass the box and go to it's parent (the
Form)?
Thanks,
Richard.