Column alignment in WebListBox

I would like to right align a column of numbers in a WebListBox. If I use

listbox1.ColumnStyle(2) = Right

where Right is a style for right alignment, I get a [quote]Parameters are not compatible with this function[/quote] error. If I use

listbox1.ColumnStyle(2) = Bold

everything in the column is bold as expected. Is there a workaround for this. I am using the Studio Stable Web Essentials listbox so I can sort columns by clicking on the header and do not want to loose that feature.

Thanks for the plug. Automatic column sorting is coming very soon. You need to make a WebStyle for those ColumnStyles. I usually name mine something like stStyleName. So:

listbox1.ColumnStyle(2) = stRightJustified

would work if you have a WebStyle, stRightJustified, in your project.

-Brad

Thank you Brad. It turns out “Right” is not a valid style name in a listbox although it works fine for labels.

Well, Right is also a global function, so you may get ambiguous compiler error.