private void btnColor2_Click(object sender, EventArgs e)
        {
            using (ColorDlg dlg = new ColorDlg())
            {
                //dlg.AllowFullOpen = true;
                //dlg.FullOpen = true;

                if (dlg.ShowDlg(pnlColor2.BackColor) == DialogResult.OK)
                {
                    pnlColor2.BackColor       = dlg.SelectedColor;
                    pnlPreview.GradientColors = new GradientDefinition(pnlPreview.GradientColors.Color1, dlg.SelectedColor, GradientColors.Point1, GradientColors.Point2, GradientColors.GradientType);
                }
            }
        }
        private void btnColor2_Click(object sender, EventArgs e)
        {
            using(ColorDlg dlg = new ColorDlg())
            {
                //dlg.AllowFullOpen = true;
                //dlg.FullOpen = true;

                if(dlg.ShowDlg(pnlColor2.BackColor) == DialogResult.OK)
                {
                    pnlColor2.BackColor = dlg.SelectedColor;
                    pnlPreview.GradientColors = new GradientDefinition(pnlPreview.GradientColors.Color1, dlg.SelectedColor, GradientColors.Point1, GradientColors.Point2, GradientColors.GradientType);
                }
            }
        }
Example #3
0
        private void SetColor(Button outButton)
        {
            ColorDlg colDlg = new ColorDlg();

            if(DialogResult.OK == colDlg.ShowDlg(outButton.BackColor))
            {
                outButton.BackColor = colDlg.SelectedColor;
            }
        }