标题:我的代码有误求解
取消只看楼主
顾帆
Rank: 1
等 级:新手上路
帖 子:10
专家分:2
注 册:2011-11-12
结帖率:60%
已结贴  问题点数:20 回复次数:1 
我的代码有误求解
using System;
using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace shiyan12_1_
{
    public partial class Appsetting : Form
    {
        public Appsetting()
        {
            InitializeComponent();
        }

        private void Appsetting_Load(object sender, EventArgs e)
        {

        }

        private void cmb_SelectedIndexChanged(object sender, EventArgs e)
        {
           string colorname= cmb.SelectedItem.ToString();
           pbo.BackColor = Color.FromName(colorname);
        }

        private void hsb_red_Scroll(object sender, ScrollEventArgs e)
        {
            pbo.BackColor = Color.FromArgb(hsb_red.Value, hsb_green.Value, hsb_blue.Value);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            tabc.SelectedTab.BackColor = pbo.BackColor;
            this.BackColor = pbo.BackColor;
        }

        private void cmx_SelectedIndexChanged(object sender, EventArgs e)
        {
            
            
        }

        private void lbx_SelectedIndexChanged(object sender, EventArgs e)
        {
         string  fontname = lbx.SelectedItem.ToString();
           if (large.Checked)
           {
               lbl.Font = new Font(fontname, 14);
           }
           if (small.Checked )
           {
               lbl.Font = new Font(fontname, 10);
           }
         
        }

        private void large_CheckedChanged(object sender, EventArgs e)
        {
            string fontname = lbx.SelectedItem.ToString();
            large.Checked = true;
            small.Checked = false;
            lbl.Font = new Font(fontname, 14);
           

        }

        private void small_CheckedChanged(object sender, EventArgs e)
        {
            string fontname = lbx.SelectedItem.ToString();
            large.Checked = false;
            small.Checked = true;
            lbl.Font = new Font(fontname,10);
        }
    }
}
搜索更多相关主题的帖子: private public 
2011-11-17 19:47
顾帆
Rank: 1
等 级:新手上路
帖 子:10
专家分:2
注 册:2011-11-12
得分:0 
    private void large_CheckedChanged(object sender, EventArgs e)
        {
            string fontname = lbx.SelectedItem.ToString();
            large.Checked = true;
            small.Checked = false;
            lbl.Font = new Font(fontname, 14);
           

        }

        private void small_CheckedChanged(object sender, EventArgs e)
        {
            string fontname = lbx.SelectedItem.ToString();
            large.Checked = false;
            small.Checked = true;
            lbl.Font = new Font(fontname,10);
        }
 large.Checked = true;
            small.Checked = false;有误

2011-11-18 15:36



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-355523-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.058460 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved