示例#1
0
        private void ChooseColor(ColorComboBox comboBox)
        {
            ColorDialog colorDialog = new ColorDialog();

            colorDialog.AllowFullOpen = true;
            colorDialog.ShowHelp      = false;
            colorDialog.Color         = comboBox.CustomColor;
            if (colorDialog.ShowDialog() == DialogResult.OK)
            {
                comboBox.CustomColor   = colorDialog.Color;
                comboBox.SelectedIndex = 0;
            }
        }
示例#2
0
		private void ChooseColor(ColorComboBox comboBox)
		{
			ColorDialog colorDialog = new ColorDialog();
			colorDialog.AllowFullOpen = true;
			colorDialog.ShowHelp = false;
			colorDialog.Color = comboBox.CustomColor;
			if (colorDialog.ShowDialog() == DialogResult.OK)
			{
				comboBox.CustomColor = colorDialog.Color;
				comboBox.SelectedIndex = 0;
			}
		}