You are here: Re: Inserting dummy lines and padding « MsSQL Server « IT news, forums, messages
Re: Inserting dummy lines and padding

Posted by Thomas R. Hummel on 09/30/70 11:33

Astra wrote:
> As for the text field, the reason I'm concat-ing the fields is because the
> text field currently expects 2 fields and these appear to line up fine. I
> just thought by concating the 2nd field with the params and then padding
> these out to make nice columns would do it, but my columns go all over the
> place.
>
> Am I doing the padding incorrectly?

It looks like the padding is correct (although if your column is 30
characters, you might want to pad it out to 31 or 32 so that there is
space when you have a value that fills the full column width.

As I said though, the problem might be in how the front end is
displaying it. Some fonts are fixed-width while others are not. What
this means is that in a fixed-width font the letter "M" is just as wide
as the letter "I" once you take into account space around the letter.
If the font is not fixed-width then a letter "I" may use up 10 pixels,
while an "M" might use up 18 (I have no idea if these numbers are even
in the ballpark, but hopefully you get the idea). As a result, with a
fixed-width font if you have 30 characters on one line and 30 on the
next they will take up the same width no matter what they are. This is
not true if they are not fixed-width.

To see this effect, open up Notepad and type in:

This line is 35 characters long
This one is also 35 characters long

Highlight the two lines and change between Arial and Courier fonts
(under the Format menu). Courier is a fixed-width font and both lines
will be just as long. Arial is not, so the lengths of the lines will
change.

HTH,
-Tom.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация