| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 804 人关注过本帖
标题:[转帖]取系统字体与格式,今天碰到找到的
取消只看楼主 加入收藏
yj3385
Rank: 1
等 级:新手上路
帖 子:29
专家分:0
注 册:2004-12-1
收藏
 问题点数:0 回复次数:0 
[转帖]取系统字体与格式,今天碰到找到的
System.Drawing.Text.InstalledFontCollection fonts = new System.Drawing.Text.InstalledFontCollection();
foreach (System.Drawing.FontFamily family in fonts.Families)
{
DropDownList1.Items.Add(family.Name);
}
//如何获得系统字体样式
ArrayList list=new ArrayList();
foreach(int i in Enum.GetValues(typeof(System.Drawing.FontStyle)))
{
ListItem listitem = new ListItem(Enum.GetName(typeof(System.Drawing.FontStyle),i),i.ToString());
list.Add(listitem);
}
DropDownList2.Items.Clear();
DropDownList2.DataSource=list;
DropDownList2.DataValueField="value";
DropDownList2.DataTextField="text";
DropDownList2.DataBind();
搜索更多相关主题的帖子: 系统字体 Drawing 转帖 System 格式 
2005-11-21 11:39
快速回复:[转帖]取系统字体与格式,今天碰到找到的
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018716 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved