private void radButtonElement49_Click(object sender, EventArgs e) { using (RadColorDialog dialog = new RadColorDialog()) { dialog.ShowDialog(); } }
private void radButton17_Click(object sender, EventArgs e) { RadColorDialog c = new RadColorDialog(); if (c.ShowDialog() == DialogResult.OK) { setColor(c.SelectedColor); } }
private void radBtnFontColor_Click(object sender, System.EventArgs e) { RadColorDialog colorDialog = new RadColorDialog(); if (colorDialog.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { this.radRichTextBox1.ChangeTextForeColor(colorDialog.SelectedColor); } this.radRichTextBox1.Focus(); }
private void radButtonBackColor_Click(object sender, EventArgs e) { RadColorDialog dialog = new RadColorDialog(); dialog.SelectedColor = this.radButtonBackColor.ButtonElement.ButtonFillElement.BackColor; if (dialog.ShowDialog() == DialogResult.OK) { this.radButtonBackColor.ButtonElement.ButtonFillElement.BackColor = dialog.SelectedColor; this.radGridView1.TableElement.Update(GridUINotifyAction.StateChanged); } }
private void radButtonAlternatingRowColor_Click(object sender, EventArgs e) { RadColorDialog dialog = new RadColorDialog(); dialog.SelectedColor = this.radButtonAlternatingRowColor.ButtonElement.ButtonFillElement.BackColor; if (dialog.ShowDialog() == DialogResult.OK) { this.radButtonAlternatingRowColor.ButtonElement.ButtonFillElement.BackColor = dialog.SelectedColor; this.radTreeView1.TreeViewElement.AlternatingRowColor = dialog.SelectedColor; } }
private void radButtonWelcomeBackColor_Click(object sender, EventArgs e) { RadColorDialog radColorDialog = new RadColorDialog(); if (radColorDialog.ShowDialog() == DialogResult.OK) { this.radWizard1.WelcomeImageElement.BackColor = radColorDialog.SelectedColor; this.radWizard1.WelcomeImageElement.DrawFill = true; this.radWizard1.WelcomeImageElement.GradientStyle = GradientStyles.Solid; this.radWizard1.WelcomeImageElement.BackgroundImage = null; } }
private void SetCellBackground() { int row = (int)this.radSpinEditorRow.Value; int column = (int)this.radSpinEditorColumn.Value; RadColorDialog dialog = new RadColorDialog(); dialog.SelectedColor = this.radGridView1.Rows[row].Cells[column].Style.BackColor; if (dialog.ShowDialog() == DialogResult.OK) { this.radGridView1.Rows[row].Cells[column].Style.BackColor = dialog.SelectedColor; this.radButtonBackColor.ButtonElement.ButtonFillElement.BackColor = dialog.SelectedColor; } }
protected virtual void ButtonElement_Click(object sender, EventArgs e) { RadColorDialog colorDialog = new RadColorDialog(); colorDialog.SelectedColor = this.value; DialogResult result = colorDialog.ShowDialog(); if (result == DialogResult.OK) { string convertedColor = this.converter.ConvertToString(colorDialog.SelectedColor); this.Value = (Color)this.converter.ConvertFromString(convertedColor); } this.OnDialogClosed(new DialogClosedEventArgs(result)); }
private void EventButtonSettingColorSelect(object sender, EventArgs e) { RadColorDialog dialog = new RadColorDialog(); if ((StxColor.Text.Length > 0) && (PvSettings.SelectedPage == PgSettingChange)) { dialog.SelectedColor = Manager.CvManager.CvColor.FromString(StxColor.Text).Value; } DialogResult result = dialog.ShowDialog(); if (result == DialogResult.OK) { StxColor.Text = Manager.CvManager.CvColor.ToString(dialog.SelectedColor); } }
protected override void CreateChildElements() { base.CreateChildElements(); this.converter = TypeDescriptor.GetConverter(typeof(Color)); this.stack = new StackLayoutElement(); this.stack.StretchHorizontally = true; this.stack.StretchVertically = true; this.stack.Class = "ColorBoxLayout"; this.stack.FitInAvailableSize = true; this.stack.ShouldHandleMouseInput = false; this.Children.Add((RadElement)this.stack); this.colorBox = this.CreateColorBoxElement(); this.colorDialog = this.CreateColorDialog(); this.colorPickerButton = this.CreateColorPickerButtonElement(); this.WireEvents(); }
private void radButtonElementFontColor_Click(object sender, EventArgs e) { RadColorDialog radColorDialog = new RadColorDialog(); if (radColorDialog.ShowDialog() == DialogResult.OK) { Color color = radColorDialog.SelectedColor; foreach (GridViewCellInfo cell in gridView.SelectedCells) { GridViewCellStyle style = cell.Style; if (style != null) { style.ForeColor = color; } } } }
private void radButtonElementColor_Click(object sender, EventArgs e) { RadColorDialog radColorDialog = new RadColorDialog(); if (radColorDialog.ShowDialog() == DialogResult.OK) { Color color = radColorDialog.SelectedColor; foreach (GridViewCellInfo cell in gridView.SelectedCells) { GridViewCellStyle style = cell.Style; if (style != null) { style.CustomizeFill = true; style.GradientStyle = GradientStyles.Solid; style.BackColor = color; } } } }
private void MyColorSelectorElement_Click(object sender, EventArgs e) { using (RadColorDialog dlg = new RadColorDialog()) { if (!string.IsNullOrEmpty(this.Text)) { string[] colors = this.Text.Split(",".ToCharArray()); if (colors.Length == 3) { Color color = GenerateColorByText(); dlg.SelectedColor = color; } } if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.Text = dlg.SelectedColor.R.ToString() + "," + dlg.SelectedColor.G.ToString() + "," + dlg.SelectedColor.B.ToString(); ((FillPrimitive)this.TextBoxElement.Children[1]).BackColor = dlg.SelectedColor; this.TextBoxElement.TextBoxItem.BackColor = dlg.SelectedColor; } } }
private void changeClassroomColorButtonClick(object sender, EventArgs e) { RadColorDialog colorDialog = new RadColorDialog(); colorDialog.SelectedColor = panelClassroomColor.BackColor; colorDialog.ShowDialog(); panelClassroomColor.BackColor = colorDialog.SelectedColor; }
private void groupboxColorButtonChangeColorClick(object sender, EventArgs e) { RadColorDialog colorDialog = new RadColorDialog(); colorDialog.SelectedColor = groupboxColorPanelColor.BackColor; colorDialog.ShowDialog(); groupboxColorPanelColor.BackColor = colorDialog.SelectedColor; }
private void changeColorButtonClicked(object sender, EventArgs e) { RadColorDialog colorDialog = new RadColorDialog(); colorDialog.SelectedColor = colorPanel.BackColor; colorDialog.ShowDialog(); colorPanel.BackColor = colorDialog.SelectedColor; }