P
Paul Cheetham
Hi,
I have a custom control, which creates 2 child controls - an ImageButton
and an image as shown in the following code:
// Setup the controls on the page.
btnImage = new System.Web.UI.WebControls.ImageButton();
btnImage.ImageAlign = ImageAlign.Top & ImageAlign.Left;
btnDisableImage = new System.Web.UI.WebControls.Image();
btnDisableImage.ImageUrl = DisableImageURLFromViewState;
btnDisableImage.Visible = false;
When this is displayed at design time, if I change the position of the
control (by changing the left and top attributes of the Style property)
then I get a rectangle drawn at the specified coordinates, and the image
button is drawn at double to specified corodinates.
So if I set the position to 100, 100, I get a rectangle drawn at that
point, and then the image is displayed at 200, 200
It looks like the style I set for the container control then also gets
applied to its child controls!
Is there a way around this?
I'm new to Custom Controls, so maybe I've missed something.
I'm developing it in VS2005, c#
Thankyou.
Paul
I have a custom control, which creates 2 child controls - an ImageButton
and an image as shown in the following code:
// Setup the controls on the page.
btnImage = new System.Web.UI.WebControls.ImageButton();
btnImage.ImageAlign = ImageAlign.Top & ImageAlign.Left;
btnDisableImage = new System.Web.UI.WebControls.Image();
btnDisableImage.ImageUrl = DisableImageURLFromViewState;
btnDisableImage.Visible = false;
When this is displayed at design time, if I change the position of the
control (by changing the left and top attributes of the Style property)
then I get a rectangle drawn at the specified coordinates, and the image
button is drawn at double to specified corodinates.
So if I set the position to 100, 100, I get a rectangle drawn at that
point, and then the image is displayed at 200, 200
It looks like the style I set for the container control then also gets
applied to its child controls!
Is there a way around this?
I'm new to Custom Controls, so maybe I've missed something.
I'm developing it in VS2005, c#
Thankyou.
Paul