• 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);
            }
  • 相关阅读:
    《怎样解题》-波利亚
    BZOJ2631 tree
    BZOJ3669 [Noi2014]魔法森林
    BZOJ 2049 [Sdoi2008]Cave 洞穴勘测
    BZOJ2002 [Hnoi2010]Bounce 弹飞绵羊
    动态树入门
    树链剖分入门-Hdu3966 Aragorn's Story
    BZOJ1146 [CTSC2008]网络管理Network
    树的表示方法
    树状数组
  • 原文地址:https://www.cnblogs.com/xiaowie/p/8608940.html
Copyright © 2020-2023  润新知