Hi,
I am asked to draw rounded rectangles around our controls, and add a caption to left of them. Now I know that this is very easy with user control. Suppose I want to modify a textbox, Add our textbox, add a label to the left , override onpaint for drawing rectangular frame and etc.
However, the controls that I am to modify are 3rd party controls, which are frequently updated by vendor. My manager doesnt want me to modify the user controls' code to expose new properties of constituent control with getters setters every time they are introduced in new versions.
If I create a non-user control which is inherited from our textbox, all public properties of textbox will be automatically exposed in this new control, so no need to modify the code on new versions of the textbox. My question is, is it possible for me to draw outside of the control bounderies in the paint event of the inherited control itself (drawing rectangular frame around it, drawing text to left of it etc.)? Or am i bound by the area of the base control, and unable to draw outside of it in its paint event?
Any higher level comments are also welcomed, thanks in advance.
Mike HankeyPosted Sep 19, 2008, 11:49 PM
Mike
serhatPosted Sep 15, 2008, 1:45 AM
hi mike, thanks for your reply.
if I create a user control and drop 3rd party control in it, then I have to expose every property of 3rd party component inside the user control code via getters setters. Thats ok, but when the 3rd party adds a new property on their control, then I'll have to manually expose it via user control code, rebuilding control each time an update to constituent control arrives, which is what we are trying to aviod.
Mike HankeyPosted Sep 12, 2008, 11:40 PM
Mike