D
Doug
I want to display a drop-down list (System.Web.UI.WebControls.DropDownList)
loaded with font names the user can select (Verdana, Garamond, etc)... got
this far no problem.
Now I'd like to have the list show ListItem styled with the font being
listed (ie., the "Verdana" ListItem is styled as Verdana).
Here's my code that doesn't work. Note fontFaces is a string array that
lists the fonts being loaded into the DDL).
for (int i=0; i < (fontFaces.GetUpperBound(0)); i++) {
System.Web.UI.WebControls.ListItem nextItem = new ListItem(fontFaces);
nextItem.Attributes.CssStyle.Add("font-family", fontFaces);
DDL_Fonts.Items.Add(nextItem);
}
What would it take to accomplish the effect I'm after?
Thanks!
loaded with font names the user can select (Verdana, Garamond, etc)... got
this far no problem.
Now I'd like to have the list show ListItem styled with the font being
listed (ie., the "Verdana" ListItem is styled as Verdana).
Here's my code that doesn't work. Note fontFaces is a string array that
lists the fonts being loaded into the DDL).
for (int i=0; i < (fontFaces.GetUpperBound(0)); i++) {
System.Web.UI.WebControls.ListItem nextItem = new ListItem(fontFaces);
nextItem.Attributes.CssStyle.Add("font-family", fontFaces);
DDL_Fonts.Items.Add(nextItem);
}
What would it take to accomplish the effect I'm after?
Thanks!