Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: KryptonColorButton Modify Recent Colors #385

Closed
sdreb3421 opened this issue Sep 23, 2021 · 14 comments
Closed

[Feature Request]: KryptonColorButton Modify Recent Colors #385

sdreb3421 opened this issue Sep 23, 2021 · 14 comments
Labels
completed This issue has been completed. enhancement New feature or request new feature A new feature has been requested. suggestion A suggestion has been requested.
Milestone

Comments

@sdreb3421
Copy link

Currently there is no way to modify the recent colors of a KryptonColorButton. Recommend adding the ability to modify recent colors at runtime and also potentially in the designer.

@sdreb3421 sdreb3421 added enhancement New feature or request new feature A new feature has been requested. suggestion A suggestion has been requested. labels Sep 23, 2021
@PWagner1
Copy link
Contributor

Hi @sdreb3421

Had a look, I think you need to use SetCustomColors(Color[][] colors)

@Smurf-IV
Copy link
Member

I have modified the example to show how to do this:

        private int[] customColors;
        private void ButtonShowFontDialog_Click(object sender, EventArgs e)
        {
            var kfd = new KryptonColorDialog {
                AllowFullOpen = chkAllowFullOpen.Checked,
                ShowHelp = chkShowHelp.Checked,
                AnyColor = chkAnyColor.Checked,
                FullOpen = chkFullOPen.Checked,
                SolidColorOnly = chkSolidColorOnly.Checked,
                CustomColors = customColors
            };
            if (kfd.ShowDialog(this) == DialogResult.OK)
            {
                KryptonMessageBox.Show(this, kfd.Color.ToString(), @"Color chosen is");
                customColors = kfd.CustomColors;
            }
        }

@Smurf-IV Smurf-IV reopened this Sep 23, 2021
@Smurf-IV
Copy link
Member

oops, My mistake thought it was do with the Common control.

@Smurf-IV
Copy link
Member

From inside the KryptonColorButton code, there is nothing that is passing the colors onto the KCD (As I showed above)

private void OnClickMoreColors(object sender, EventArgs e)
        {
            // Give user a chance to cancel showing the Krypton more colors dialog
            CancelEventArgs cea = new();
            OnMoreColors(cea);

            // If not instructed to cancel then...
            if (!cea.Cancel)
            {
                // Use a Krypton color dialog for the selection of custom colors
                KryptonColorDialog cd = new()
                {
                    Color = SelectedColor,
                    FullOpen = _allowFullOpen
                };

                // Only if user selected a value do we want to use it
                if (cd.ShowDialog() == DialogResult.OK)
                {
                    SelectedColor = cd.Color;
                }
            }
        }

@PWagner1
Copy link
Contributor

Could the KCD have an optional feature to add colours to the KryptonColorButton recent list?

@Smurf-IV
Copy link
Member

SetCustomColors

Does this set the following:
image

@Smurf-IV
Copy link
Member

Could the KCD have an optional feature to add colours to the KryptonColorButton recent list?

I think the KCD should take the colours from the recent colours list.

@sdreb3421
Copy link
Author

Current behavior:

  • It's not possible to add colors programmatically to the recent colors list (recommend implementing).
  • Recent colors are not shown in the KCD custom color list (recommend implementing).
  • The selected color in the KCD is added to the recent colors list (good).
  • Colors selected in the Theme/Standard list are not added to recent colors (recommend implementing).

@jgreywolf
Copy link

Similar to #776

@Smurf-IV
Copy link
Member

Smurf-IV commented Dec 4, 2022

@sdreb3421 I know this is "old" but I'm a little confused (See below):

Current behavior:
* It's not possible to add colors programmatically to the recent colors list (recommend implementing).

Ok, this is what this FR is about

* Recent colors are not shown in the KCD custom color list (recommend implementing).

Do you mean __KCD__ialog, or just miss-typed and you mean __KCB__utton?

* Colors selected in the Theme/Standard list are not added to recent colors (recommend implementing).

Do you mean __KCB__utton?

@Smurf-IV
Copy link
Member

Smurf-IV commented Dec 4, 2022

This is done:
image

@Smurf-IV Smurf-IV removed their assignment Dec 4, 2022
@Smurf-IV Smurf-IV added the awaiting feedback A fix for this issue has been implemented, waiting for feedback on the fix. label Dec 4, 2022
Smurf-IV added a commit to Krypton-Suite/Standard-Toolkit-Demos that referenced this issue Dec 4, 2022
@PWagner1 PWagner1 added this to the Version 8 milestone Dec 4, 2022
@PWagner1
Copy link
Contributor

PWagner1 commented Dec 4, 2022

@sdreb3421

Please re-test using build >= .338

@PWagner1
Copy link
Contributor

Hi @sdreb3421

Is this working now?

@sdreb3421
Copy link
Author

Yes thank you

@PWagner1 PWagner1 added completed This issue has been completed. and removed under investigation This bug/issue is currently under investigation. awaiting feedback A fix for this issue has been implemented, waiting for feedback on the fix. labels Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed This issue has been completed. enhancement New feature or request new feature A new feature has been requested. suggestion A suggestion has been requested.
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants