-
October 12th, 2010, 05:17 AM
#1
Width of a tab sequence
Can anyone tell me what the width of a tab sequence ( string L"\t" ) is when typed on a certain TextBox control ? I mean, is there a function that returns an answer in some sense, either in pixels or in some other measurement ? Obviously, it doesn't depend on number of characters, since each character has its own width.
The reason I'm asking is because I want to align strings on the textbox in somewhat a table so that each column starts at the same position. I want something like this :
Code:
word number1 number2
longword number3 number4
word2 number5 number6
But what I get is
Code:
word number1 number2
longword number3 number4
word2 number5 number6
I add a string L"\t\t\t\t" to the left sided strings in my loop, and in case a word is too long or too short, it shifts the right cells to the right or to the left until a neighboring tab position. Is there a better solution than controlling the number of '\t' symbols that I add to my string ?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|