postion of text in label and text in textbox is not same
-
I made WinForm project. And I made a label and it has a font of 12 point and Comic Sans MS. And below of it, I made a textbox too and it has a font of 12 point and Comic Sans MS. both of it are multiline. and I give a words in this.label1.Text="I found a reason for me to change who I used to be. A reason to start over new. And the reason is you."; and I runed my program and I typed same as above on textbox. and position of the text of textbox is more left than label text. I hope it's position of left to right is same. Someone help please. StreamFormat? or anything? Image will remind us some feelings and if I can ask someone about a problem, that's not a bad life.
-
I made WinForm project. And I made a label and it has a font of 12 point and Comic Sans MS. And below of it, I made a textbox too and it has a font of 12 point and Comic Sans MS. both of it are multiline. and I give a words in this.label1.Text="I found a reason for me to change who I used to be. A reason to start over new. And the reason is you."; and I runed my program and I typed same as above on textbox. and position of the text of textbox is more left than label text. I hope it's position of left to right is same. Someone help please. StreamFormat? or anything? Image will remind us some feelings and if I can ask someone about a problem, that's not a bad life.
I made a small test program and did the same thing that you describe. I see that I had to make the textbox narrower so that the text wrapped thesame way. I also have to make the textbox taller. I saw that the textbox had the characters 1 pixel to the right of the label. Also the spacing between lines for each was different too. It looks like it might be about 1.5 pixels or so added to each line in the textbox that the label does not have. With VS.Net 2005 (at least on my system), when you move a textbox it goes transparent and you can see what is underneath. I put the text in both the label and the textbox and it was very obvious that the line spacing was off and the left-right spacing was off by 1 pixel as well. Sorry I could not come up with something more than confirming what you see even on the new compiler. Steve Maier, MCSD MCAD
-
I made WinForm project. And I made a label and it has a font of 12 point and Comic Sans MS. And below of it, I made a textbox too and it has a font of 12 point and Comic Sans MS. both of it are multiline. and I give a words in this.label1.Text="I found a reason for me to change who I used to be. A reason to start over new. And the reason is you."; and I runed my program and I typed same as above on textbox. and position of the text of textbox is more left than label text. I hope it's position of left to right is same. Someone help please. StreamFormat? or anything? Image will remind us some feelings and if I can ask someone about a problem, that's not a bad life.
In addition to what Steve said, you can also adjust the position of the text in a
Label
using theTextAlign
property. This is also available to set in the designer with a usefulUITypeEditor
similar to what theDock
property exposes. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles]