Control- hScrollBar&radiobutton&checkBox

代码节选:

    private void hScrollBar2_Scroll(object sender, ScrollEventArgs e)
    {

        month.Text = "月份:"+e.NewValue.ToString()+"个月";

        aa = this.hScrollBar1.Value + this.hScrollBar1.Value * this.hScrollBar2.Value * this.hScrollBar3.Value * 0.01;
        result.Text = aa.ToString();
    }

//radiobutton

//修改字体大小
private void radioButton6_CheckedChanged(object sender, EventArgs e)
{
tB.Font = new Font(tB.Font.FontFamily, 16, tB.Font.Style);

    }

//修改字体类型
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
tB.Font = new Font("楷体",tB.Font.Size, tB.Font.Style);
}

//checkBox

    private void checkBox3_CheckedChanged(object sender, EventArgs e)
    {
        if (checkBox3.Checked)
            tB.Font = new Font(tB.Font, tB.Font.Style | FontStyle.Bold);
        else
        {
            tB.Font = new Font(tB.Font, tB.Font.Style ^ FontStyle.Bold);

        }
      
    }

    private void checkBox2_CheckedChanged(object sender, EventArgs e)
    {
        if (checkBox2.Checked)
            tB.Font = new Font(tB.Font, tB.Font.Style | FontStyle.Italic);
        else
        {
            tB.Font = new Font(tB.Font, tB.Font.Style ^ FontStyle.Italic);

        }

    }

    private void checkBox1_CheckedChanged(object sender, EventArgs e)
    {
        if (checkBox1.Checked)
            tB.Font = new Font(tB.Font, tB.Font.Style | FontStyle.Underline);
        else
        {
            tB.Font = new Font(tB.Font, tB.Font.Style ^ FontStyle.Underline);

        }

    }

//改颜色
    private void radioButton8_CheckedChanged(object sender, EventArgs e)
    {
        tB.ForeColor = Color.Blue;
    }
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 1. Java基础部分 基础部分的顺序:基本语法,类相关的语法,内部类的语法,继承相关的语法,异常的语法,线程的语...
    子非鱼_t_阅读 34,564评论 18 399
  • 一. Java基础部分.................................................
    wy_sure阅读 3,988评论 0 11
  • 1获取系统语言设置 NSUserDefaults *userDefault = [NSUserDefaults s...
    koreadragon阅读 3,648评论 0 11
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 136,465评论 19 139
  • 教学楼。 我刚刚到,就碰到了室友。 外面下雨。 “你要出去呀?外面下雨呢,你带上伞。”我收了伞。 “哦好的。”他吧...
    李爹阅读 301评论 0 4

友情链接更多精彩内容