hangman
February 27th, 2006, 08:39 AM
Hi everyone, I'm working on this project where I need to have tons of comboboxes with certain numbers and codes in them. Every one of these codes has a certain description and I would like to show them all this way:
"code | description"
Now, the problem with this is when the codes have different lengths. Usually it only differs one char, so I thought it was just a matter of adding a little check on the length of the code and then adding a blank in front of the "|" when the code had the shorter form, but the problem with this is that it just never alligns nicely. There will always be two or three pixels of difference between the length in front of the "|" for the shorter and the longer form of the code.
If anyone has any suggestions (adding a certain length of white pixels for example, although I think this might be a bit far fetched) or any other ways to display the codes and descriptions nicely, I'd be immensely greatful!
Thanks in advance!!
"code | description"
Now, the problem with this is when the codes have different lengths. Usually it only differs one char, so I thought it was just a matter of adding a little check on the length of the code and then adding a blank in front of the "|" when the code had the shorter form, but the problem with this is that it just never alligns nicely. There will always be two or three pixels of difference between the length in front of the "|" for the shorter and the longer form of the code.
If anyone has any suggestions (adding a certain length of white pixels for example, although I think this might be a bit far fetched) or any other ways to display the codes and descriptions nicely, I'd be immensely greatful!
Thanks in advance!!