Saturday, 31 August 2013

Making entire LinkLabel area clickable

Making entire LinkLabel area clickable

I like some of my linklabels to have padding with a BackColor, kind of
like this:
Click here
But the problem is that you can't really have a padded linklabel which can
be clicked, you'd have to click just the text only (the click doesn't
register if you click within the padded area.)
So the other option is to have a Panel with the linklabel inside of it and
register Click event for both linklabel and panel controls in order to get
that clickable button effect.
How can we:
Make a have a linklabel inside a panel and have either of them respond to
click event _without having to register to click event for both controls;
or:
Have a LinkLabel with padding of 10px all the way around and make the
entirety of the linklabel clickable?

No comments:

Post a Comment