471,612 Members | 1,381 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,612 software developers and data experts.

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;
this code not work and background show with white color.
please give me idea to transparent the background of this dynamic control.
Oct 22 '09 #1
4 3060
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
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?

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
reply views Thread by CCCYYYY | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.