ExRichTextEdit 控件下载


ExRichTextEdit 控件下载


从网上找来一个扩展的RichTextEdit组件,支持插入图片,格式文本,设置文本底色等操作,只要调用方法即可。

命名空间:Khendys.Controls.ExRichTextEdit


格式化文本及插入图片Demo:

贴图图片


使用方法:



       private void menuItem10_Click(object sender, System.EventArgs e)

        {

            string[] _about = new string[10];

            Font[] _fonts = new Font[3];

 

            rtBox_Main.Rtf = "";

 

            _fonts[0] = new Font(FontFamily.GenericSerif, 16f);

            _fonts[1] = new Font(FontFamily.GenericSansSerif, 12f);

            _fonts[2] = new Font(FontFamily.GenericMonospace, 8f);

 

            _about[0] = "This text and images are ";

            _about[1] = "being inserted on the\n";

            _about[2] = "Click ";

            _about[3] = "event of this menu item.\n\n";

            _about[4] = "Sorry I cleared the document, ";

            _about[5] = " but just click ";

            _about[6] = "undo ";

            _about[7] = "and you'll be ok. ";

            _about[8] = "\n\nHa Ha!  No undo.\n\n";

            _about[9] = "Khendys was here ...";

 

            rtBox_Main.InsertTextAsRtf(_about[0], _fonts[0]);

            rtBox_Main.InsertTextAsRtf(_about[1], new Font(_fonts[1], FontStyle.Strikeout));

            rtBox_Main.InsertTextAsRtf(_about[2], new Font(_fonts[0], FontStyle.Bold | FontStyle.Italic), RtfColor.Olive, RtfColor.Aqua);

            rtBox_Main.InsertTextAsRtf(_about[3], new Font(_fonts[1], FontStyle.Italic), RtfColor.Gray);

            rtBox_Main.InsertTextAsRtf(_about[4], new Font(_fonts[2], FontStyle.Bold), RtfColor.Red, RtfColor.Yellow);

            rtBox_Main.InsertImage(new Bitmap(typeof(RtfInsert), "Smilies.AngrySmile.png"));

            rtBox_Main.InsertTextAsRtf(_about[5], _fonts[0]);

            rtBox_Main.InsertTextAsRtf(_about[6], _fonts[0], RtfColor.Blue, RtfColor.Aqua);

            rtBox_Main.InsertTextAsRtf(_about[7], _fonts[1]);

            rtBox_Main.InsertImage(new Bitmap(typeof(RtfInsert), "Smilies.CrySmile.png"));

            rtBox_Main.InsertTextAsRtf(_about[8], new Font(_fonts[2], FontStyle.Bold | FontStyle.Italic), RtfColor.Red, RtfColor.Aqua);

            rtBox_Main.InsertTextAsRtf(_about[9], new Font(_fonts[1], FontStyle.Italic | FontStyle.Bold | FontStyle.Underline), RtfColor.Black, RtfColor.Red);

            rtBox_Main.InsertImage(new Bitmap(typeof(RtfInsert), "Smilies.Beer.png"));

        }






版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
C/S框架网
上一篇:OpenFileDialog Filter属性设置所有图片格式
下一篇:使用FastReport打印RichTextBox RTF 格式的报表
评论列表

发表评论

评论内容
昵称:
关联文章

ExRichTextEdit 下载
C# ImageListView下载(源代码)
JS日期
ucWindowTitle用户 - 用户界面规范
请问开发框架中是否用到DevExpress?
使用Scheduler实现生产进度监控程序
使用的第三方都有哪些?是否有版权问题?
C# Barcode条码使用方法
C#.Net自定义 - GridPopupContainerLookup
.NET RichTextBox使用详解
C#.Net自定义 - GridPopupContainerEdit
C# 实现完整功能的截图(1)-实现绘图工具栏
界面是否全部使用dev的?还是也可以选择其它的库?
DevExpress 通过小三角图标变更类型
XtraTabbedMdiManager配置选项卡显示位置
LookUpEdit带给用户良好的操作体验
C# Winform中如何获取父窗体中的信息
绑定CheckEdit处理字符类型Y/N
C#实现DevExpress换肤功能
分享2个日期选择 datePicker

热门标签
.NET5 .NET6 .NET7 APP Auth-软件授权注册系统 Axios B/S B/S开发框架 Bug Bug记录 C#加密解密 C#源码 C/S CHATGPT CMS系统 CodeGenerator CSFramework.DB CSFramework.EF CSFrameworkV1学习版 CSFrameworkV2标准版 CSFrameworkV3高级版 CSFrameworkV4企业版 CSFrameworkV5旗舰版 CSFrameworkV6.0 DAL数据访问层 Database datalock DbFramework Demo教学 Demo下载 DevExpress教程 DOM EF框架 Element-UI EntityFramework ERP ES6 Excel FastReport GIT HR IDatabase IIS JavaScript LINQ MES MiniFramework MIS NavBarControl Node.JS NPM OMS ORM PaaS POS Promise API Redis SAP SEO SQL SQLConnector TMS系统 Token令牌 VS2022 VSCode VUE WCF WebApi WebApi NETCore WebApi框架 WEB开发框架 Windows服务 Winform 开发框架 Winform 开发平台 WinFramework Workflow工作流 Workflow流程引擎 版本区别 报表 踩坑日记 操作手册 代码生成器 迭代开发记录 基础资料窗体 架构设计 角色权限 开发sce 开发技巧 开发教程 开发框架 开发平台 开发指南 客户案例 快速搭站系统 快速开发平台 秘钥 密钥 权限设计 软件报价 软件测试报告 软件简介 软件开发框架 软件开发平台 软件开发文档 软件体系架构 软件下载 软著证书 三层架构 设计模式 生成代码 实用小技巧 收钱音箱 数据锁 数据同步 微信小程序 未解决问题 文档下载 喜鹊ERP 喜鹊软件 系统对接 详细设计说明书 行政区域数据库 需求分析 疑难杂症 蝇量级框架 蝇量框架 用户管理 用户开发手册 用户控件 在线支付 纸箱ERP 智能语音收款机 自定义窗体 自定义组件 自动升级程序