| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 643 人关注过本帖
标题:问题xx
只看楼主 加入收藏
casualhewo
Rank: 1
等 级:新手上路
帖 子:267
专家分:0
注 册:2006-6-13
收藏
 问题点数:0 回复次数:1 
问题xx

private void miBold_Click(object sender, System.EventArgs e)
{
Font newFont = new Font(rtfText.SelectionFont,
(rtfText.SelectionFont.Bold ?
rtfText.SelectionFont.Style & ~FontStyle.Bold :
rtfText.SelectionFont.Style | FontStyle.Bold));
rtfText.SelectionFont = newFont;

}
我想问一下
Font newFont = new Font(rtfText.SelectionFont,
(rtfText.SelectionFont.Bold ?
rtfText.SelectionFont.Style & ~FontStyle.Bold :
rtfText.SelectionFont.Style | FontStyle.Bold));
什么意思啊!
rtfText.SelectionFont.Style & ~FontStyle.Bold :
这个是怎么比较的啊.
rtfText.SelectionFont.Bold ?这行是不是当前选定的文本是副为粗体.
如果为粗体 rtfText.SelectionFont.Style & ~FontStyle.Bold :
这个比较是什么意思啊!
如果不为粗体.rtfText.SelectionFont.Style | FontStyle.Bold
这个又是什么意思啊!

搜索更多相关主题的帖子: rtfText Bold Style sender 
2006-08-11 23:23
chenjin145
Rank: 1
等 级:禁止访问
帖 子:3922
专家分:0
注 册:2006-7-12
收藏
得分:0 
SelectionFont.Bold 是enum的第一位 應該是00000000000
所以~FontStyle.Bold 是11111111111

rtfText.SelectionFont.Style & ~FontStyle.Bold
就是bold&~bold 還是返回0


rtfText.SelectionFont.Style | FontStyle.Bold
就是bold以外的字體 | 0000000 所以返回bold原來的style

[url=javascript:alert(1);] [div]fdgfdgfdg\" on\"[/div] [/url]
2006-08-12 08:59
快速回复:问题xx
数据加载中...
 
   



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

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