How to Determine The Location Of Label Text In Pixels
-
Hi, I need to determine the location of label text in pixels as Margin, Padding, and TextAlign properties change
no, you need to ask your mother to teach you some manners!!!!:mad:
Harvey Saayman - South Africa Junior Developer .Net, C#, SQL
you.suck = (you.passion != Programming)
-
no, you need to ask your mother to teach you some manners!!!!:mad:
Harvey Saayman - South Africa Junior Developer .Net, C#, SQL
you.suck = (you.passion != Programming)
Thanks for your answer, but sorry it doesn't help I advice you to ask your mother to teach you some attitude manners
-
Thanks for your answer, but sorry it doesn't help I advice you to ask your mother to teach you some attitude manners
Thanx for the 1 vote... some of us are professional developers with alot of work to do and we dont have time to read pointless posts like yours, we keep an eye on these forums to help people to solve problems they are having. NOW WHO THE HELL DO YOU THINK YOU ARE comming in here, and DEMANDING that we do YOUR WORK for you? are you stupid or something? no one here or anywhere else will do your work for you.
Harvey Saayman - South Africa Junior Developer .Net, C#, SQL
you.suck = (you.passion != Programming)
-
Hi, I need to determine the location of label text in pixels as Margin, Padding, and TextAlign properties change
Ahmad Safwat wrote:
the location of label text in pixels as Margin, Padding, and TextAlign properties change
You won't get the location of the text, you can take location of the label instead. Check
label.Bounds
which gives you aRectangle
instance.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
-
Thanx for the 1 vote... some of us are professional developers with alot of work to do and we dont have time to read pointless posts like yours, we keep an eye on these forums to help people to solve problems they are having. NOW WHO THE HELL DO YOU THINK YOU ARE comming in here, and DEMANDING that we do YOUR WORK for you? are you stupid or something? no one here or anywhere else will do your work for you.
Harvey Saayman - South Africa Junior Developer .Net, C#, SQL
you.suck = (you.passion != Programming)
Hi Harvey My post is not pointless, I think you didn't understand it as you may be "stupid or something" My problem is that, I'm working in an application in which I manually simulate some control appearance and draw them in a high resolution image to be printed, now when drawing a Label I need to determine the point(X, Y) on which I print the Label text, as Label.TextAlign may vary from MiddleCenter, to BottomLeft, to TopRight, etc. Now, can you - as a "Professional" developer - help me?? I don't think so.. Even if my question is pointless, it's not enough reason for you to insult me Sorry, but you are not a respectable person
-
Ahmad Safwat wrote:
the location of label text in pixels as Margin, Padding, and TextAlign properties change
You won't get the location of the text, you can take location of the label instead. Check
label.Bounds
which gives you aRectangle
instance.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
Sorry, but I don't understand how could label.Bounds help me to determine the location of text on Lable??
-
Sorry, but I don't understand how could label.Bounds help me to determine the location of text on Lable??
The bounds (which is type Rectangle) has members for top, bottom, right, and left. (left, top) gives you the location of the label's upper-left corner.
-
Sorry, but I don't understand how could label.Bounds help me to determine the location of text on Lable??
I guess if you want to know where exactly the text is painted within the label, you'll have to get the control's graphics object, determine the text size with its MeasureString methhod, and calculate the position with a lot of if statements according to alignment and things. But that's kind of like reinventing the label.
-
I guess if you want to know where exactly the text is painted within the label, you'll have to get the control's graphics object, determine the text size with its MeasureString methhod, and calculate the position with a lot of if statements according to alignment and things. But that's kind of like reinventing the label.
Hi Frank yes that is exactly what I need and I already calculated the position but it's not accurate, so I was asking if there is an existing method to do
-
Hi, I need to determine the location of label text in pixels as Margin, Padding, and TextAlign properties change
Hey, can anybody help me?