zoukankan      html  css  js  c++  java
  • RichTextBox控件

    RichTextBox控件允许用户输入和编辑文本的同时提供了比普通的TextBox控件更高级的格式特征

    //colorc#中是个枚举enum

    蓝色按钮:在蓝色按钮注册click事件后,richtextbox1.selectioncolor=color.blue

    红色按钮:在红色按钮注册click事件后,RichTextBox1.selectionColor=color.Red

    隶属18按钮;在注册click事件后,RichTextBox1.selectionFont=new font(“隶属”,18);

    楷书18按钮;在注册事件后,RichTextBox1.selectionFont=new font(“楷书”,20);

    项目符号;在注册事件后,RichTextBox1.selectionBullet=true

    底纹;在注册事件后,RichTextBox1.selectionBackColor=color.gray//底纹就是背景颜色

    复原://要看看richtextbox以前的字体是什么的,之后直接赋值就好了

    RichTextBox1.selectionFont=new font(“宋体”,15);

    RichTextBox1.selectionColor=color.white//上面所有的都要写回来

     

         private void blue_Click(object sender, EventArgs e)

            {

                //richb.选择颜色=颜色中的蓝色

                Richb.SelectionColor = Color.Blue;

            }

     

            private void red_Click(object sender, EventArgs e)

            {

                Richb.SelectionColor = Color.Red;

            }

     

            private void fontKt18_Click(object sender, EventArgs e)

            {

                Richb.SelectionFont = new Font("楷书",18);

            }

     

            private void micr20_Click(object sender, EventArgs e)

            {

                Richb.SelectionFont = new Font("微软雅黑", 18);

            }

     

            private void DWbut_Click(object sender, EventArgs e)

            {

                Richb.SelectionBackColor = Color.Yellow;

            }

     

            private void resat_Click(object sender, EventArgs e)

            {

                Richb.SelectionBackColor = Color.White;

                Richb.SelectionColor = Color.Black;

                Richb.SelectionFont = new Font("宋体",9);

            }

         private void blue_Click(object sender, EventArgs e)
            {
                //richb.选择颜色=颜色中的蓝色
                Richb.SelectionColor = Color.Blue;
            }
    
            private void red_Click(object sender, EventArgs e)
            {
                Richb.SelectionColor = Color.Red;
            }
    
            private void fontKt18_Click(object sender, EventArgs e)
            {
                Richb.SelectionFont = new Font("楷书",18);
            }
    
            private void micr20_Click(object sender, EventArgs e)
            {
                Richb.SelectionFont = new Font("微软雅黑", 18);
            }
    
            private void DWbut_Click(object sender, EventArgs e)
            {
                Richb.SelectionBackColor = Color.Yellow;
            }
    
            private void resat_Click(object sender, EventArgs e)
            {
                Richb.SelectionBackColor = Color.White;
                Richb.SelectionColor = Color.Black;
                Richb.SelectionFont = new Font("宋体",9);
            }
  • 相关阅读:
    udp tcp
    easy_install jinja2 mac linux
    linux 常用命令;
    Mac android 开发 sdk配置和手机连接
    ubuntu server 分区
    常见操作
    环境搭建相关
    ssh登录虚拟机上的linux
    算法学习
    转载一个 测试java类的玩意
  • 原文地址:https://www.cnblogs.com/xiaowie/p/8608940.html
Copyright © 2011-2022 走看看