CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 List Box font change

Print topic Send  topic

Author Message
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]

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.