Darius
|
Posted: 01/07/2004, 8:41 AM |
|
Any idea on how to change the font size and colour in a List Box?
I am using CC2.0.7 and ASP no templates.
Thanks
|
|
|
Edd
|
Posted: 01/07/2004, 4:45 PM |
|
You cannot do it in plain CCS.
What you have to do is to build the listbox yourself, i.e. you make the current listbox a label type HTML. You then write out the <SELECT> statement yourself in the beforeshow event as normal except when you get to each of the options you need add additional information to each of the option tags, e.g. a multi colored list box.
--------------------------
StrHTML = "<select name=""ColorIDSelect"" onchange=""changedSelection();"">" & vbCRLF
Do Until DBRs.EOF
StrHTML = StrHTML & "<option value=""" & DBRs("ColorID") & """ style=""color: " & DBRs("TextColor") & "; background-color: " & DBRs("BGColor") & ";"""
If DBRs("ColorID") = ColorID Then
StrHTML = StrHTML & " SELECTED "
End If
StrHTML = StrHTML & "></option>" & vbCRLF
DBRs.MoveNext
Loop
StrHTML = StrHTML & "</select>" & vbCRLF
------------------------------
Note may need to program in a Javascript procedure (e.g. changedSelection() above) to take the value from the listbox and populate a hidden field.
Regards,
Edd
[www.syntech.com.au]
|
|
|
|