atesh Posted August 28, 2003 Posted August 28, 2003 somebody please explain to me how to do this: all i want is to have some text appear over the top of several labels in my form. for an example: look at the attached image. I want the red 'Text' to appear over the labels but I don't want the grey background. It's driving me crazy trying to accomplish this so a little guidance is greatly appreciated. Quote To err is human, to really foul things up requires a computer.
wyrd Posted August 28, 2003 Posted August 28, 2003 I'd use an invisible label which I set Visible = true/false depending to show/hide text. Making the label have a transparent background (isn't that the default?) should remove the gray area. Quote Gamer extraordinaire. Programmer wannabe.
atesh Posted August 28, 2003 Author Posted August 28, 2003 making it transparent doesn't remove the gray area. Quote To err is human, to really foul things up requires a computer.
*Experts* Bucky Posted August 28, 2003 *Experts* Posted August 28, 2003 Instead of using Labels in the first place, you could draw the text on Form manually in its Paint event. You'd have much more control over painting them, and then you could paint the red text without the ugly label background. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
atesh Posted August 28, 2003 Author Posted August 28, 2003 but won't the drawn text go onto the form and the other labels will cover it up? Quote To err is human, to really foul things up requires a computer.
pjv Posted August 28, 2003 Posted August 28, 2003 No, I think the stuff in OnPaint gets done last, but when this sort of thing occurs.. just try it? Pete Quote
*Experts* Volte Posted August 28, 2003 *Experts* Posted August 28, 2003 If you do what Bucky said, you'll want to avoid using labels at all; use the FillRectangle method of the graphics object (e.Graphics in the Paint event) to paint the solid colored backgrounds, and then the [d]DrawString[/b] method to draw the text. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.