C#上机 第十周 单选按钮和复选框
2012-11-12 16:45
330 查看
/* * 程序头部注释开始 * 程序的版权和版本声明部分 * Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved. * 文件名称:单选按钮和复选框 * 作 者:薛广晨 * 完成日期:2012 年 11 月 12 日 * 版 本号:x1.0 * 对任务及求解方法的描述部分 * 输入描述: * 问题描述: * 程序输出: * 程序头部的注释结束 */ using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication3 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { label1.Text = "烟台大学"; label1.AutoSize = true; label1.Font = new Font("宋体", 48, FontStyle.Regular); } private void checkBox1_CheckedChanged(object sender, EventArgs e) { label1.Font = new Font(label1.Font.Name, label1.Font.Size, checkBox1.Checked ? label1.Font.Style | FontStyle.Italic : label1.Font.Style ^ (FontStyle.Italic)); } private void checkBox2_CheckedChanged(object sender, EventArgs e) { label1.Font = new Font(label1.Font.Name, label1.Font.Size, checkBox1.Checked ? label1.Font.Style | FontStyle.Underline : label1.Font.Style ^ (FontStyle.Underline)); } private void radioButton1_CheckedChanged(object sender, EventArgs e) { label1.Font = new Font("楷体_GB2312", label1.Font.Size, label1.Font.Style); } private void radioButton2_CheckedChanged(object sender, EventArgs e) { label1.Font = new Font("宋体", label1.Font.Size, label1.Font.Style); } } }
运行结果:
相关文章推荐
- C#窗体应用(复选框,单选按钮,拖动水平滚动条)
- C#当中单选按钮、复选框实例
- C# WinForm下DataGridView单选按钮列和支持三种选择状态的复选框列的实现
- C# WinForm下DataGridView单选按钮列和支持三种选择状态的复选框列的实现
- 第11章、单选按钮和复选框
- Windows单选按钮、复选框、分组框控件
- 【特效】单选按钮和复选框的美化(只用css)
- Android学习笔记17---单选按钮&复选框
- 绿色单选按钮以及复选框
- 判断单选按钮和复选框是否被选中
- 菜鸟Android学习之路05——单选按钮和复选框
- MFC-复选框单选按钮用法
- Ui设计中单选按钮与复选框详解
- 复选框、单选按钮、下拉列表的定义
- 复选框与单选按钮
- 下拉列表、单选按钮、复选框常用用法总结
- jQuery扁平化单选按钮和复选框美化插件
- JavaScript事件处理 学习(2)—单选按钮 复选框 下拉框操作
- 一步一步地实现菜单栏(JMenuBar)工具栏(JPopupMenu)组合框(JComboBox)复选框(JCheckBox)单选按钮(JRadioButton)文本域的综合应用(三)
- Qt学习六:控件三:单选按钮、复选框、列表控件、树控件