(You didn't say whether or not you were using CGI or Tk. I'm going to assume CGI, as that's my forte.)
I'm a little confused as to why you want a tab character (\t) in your listbox. However, you could use CSS to simulate it. That's what I'd recommend. If you explained better, we could give a better answer. The issue is that some browsers see tabs as whitespace (and collapse it) and others see it as an unprintable character (hence, the square box).
Being right, does not endow the right to be rude; politeness costs nothing. Being unknowing, is not the same as being stupid. Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence. Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.
| [reply] |
Whoops I'm sorry: I'm using Perl\Tk. And the reason why I need this tabulation is to create two columns in the listbox. Now I'm aware that HListbox can do that easily, however I need to precisely and exclusively control all the keyboard-arrows bindings, and HListbox comes with pre-packaged bindings that I would have to fight all the way. Also, I'm aware of the possibility to command two listboxes at the same time, but I don't want the separation in the middle. In other words, I'm pretty happy with my simple Listbox, but I need to be able to translate this "unprintable character" into a "real spaced" tabulation... Hope that clears up some confusion.
| [reply] |
As far as I know this is not possible, the list box will strip out any special characters you pass to it. You can get a column layout with spaces; however this will not be a true tab. You will also need to apply a variable number of spaces in-between the strings to get the columns to line up properly.
| [reply] |