469,275 Members | 1,549 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

How Transparent the background of link label control?

i am developing smart phone application with VS 2005 using C#.
i am trying to transparent the background of link label control which dynamically added in panel. i try with following code to transparent the background of link label control .
Expand|Select|Wrap|Line Numbers
  1.   LinkLabel lnklbl = new LinkLabel();
  2. lnklbl .Text="Click Me";
  3. lnklbl .BackColor = Color.Transparent;
  4.  
this code not work and background show with white color.
please give me idea to transparent the background of this dynamic control.
thankx
Oct 22 '09 #1
4 2972
markmcgookin
648 Expert 512MB
Hmm... that is strange I thought it would be transparent by default.

You could always set it to

Expand|Select|Wrap|Line Numbers
  1.  lnklbl.BackColor = this.lnklbl.Parent.BackColor; 
which would set it to it's parent's backcolor, so it would LOOK transparent.
Oct 22 '09 #2
Thanx mr. markmcgookin ,
this code is not work well because the panel contain image as
background in picture box control and all link label display on image by
"BringToFront()" method.what is way to transparent control in this situation.
if u have a any other idea please share with me.
Oct 23 '09 #3
markmcgookin
648 Expert 512MB
I don't think you can ever get a truely transparant background ontop of an image in the compact framework.

It would require quite a bit of processing power to do this, as the bounds of the lable object would surely have to mimic the colours of the object below it. Why are you placing a link label on an image. Why not just set an onclick event for the image and have this mimic the behaviour of the link?

Mark
Oct 27 '09 #4
thanx for respons,
How i use bound object to do this?
Oct 28 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Efkas | last post: by
3 posts views Thread by SStory | last post: by
4 posts views Thread by jcrouse | last post: by
2 posts views Thread by Martin | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.