You need to sign in to do that
Don't have an account?
Problem adding whitespace to selectOption
I have a controller extension that I'm using to populate a selectList. I have two categories of information that I'd like users to be able to select from so I'm trying to create an indented type of look on the SelectList:
Type 1
Select 1
Select 2
Type 2
Select 1
Select 2
I can't seem to find a way to get any blank space to be maintained on the VF page I've tried among other things setting the style on the selectlist to style="white-space:pre;" and embedding non-breaking space in my selectoption string but that doesn't work - Options.add(new SelectOption(1, ' Select 1'));
Any Suggestions?
meant to show Select 1, Select 2 etc. indented.
Hi
Please use the string   infront of each of your Select 1,Select 2 browser will understand as space.
Try with more ' '
This is within APEX code not in the browser. The '  just shows up in the string it does not create any white space.