Declined
Last Updated: 16 Feb 2024 12:35 by ADMIN
James
Created on: 28 Nov 2022 00:30
Category: UI for WinForms
Type: Bug Report
1
RadColorBox: Color Dialog - Select: Web Colour Tab Transparent - Selecting Any Colour In Professional Tab Won't Update

1. Select the ColorBox's ellipses to open the Color Dialog

2. Select the Web tab

3. Select Any colour in this Page

4. Select Transparent

Colour will update

5. Select the Professional tab

6. Select any colour

Colour won't update

7. Select any colour

Colour won't update

8. Select OK on Dialog

Colour will be transparent

Values will be same as selected in step 7

4 comments
ADMIN
Dinko | Tech Support Engineer
Posted on: 16 Feb 2024 12:35

Hi James,

The status of the item is changed to Declined. The reported behavior is the default one and a possible solution was suggested by Desislava.

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 29 Nov 2022 09:52

Hi, James,

I understand what is your concern. However, no matter what tab is selected, the dialog has a currently selected color that is displayed in the Professional tab. That is why when the selected color is Transparent, the alpha value is set to 0. We can't consider this as an issue. But I can suggest an appropriate solution how to achieve the desired behavior:

        public RadForm1()
        {
            InitializeComponent();
            this.radColorBox1.Value = Color.Blue; 

            RadColorSelector selector = this.radColorBox1.ColorDialog.ColorDialogForm.RadColorSelector as RadColorSelector;
            selector.ControlsHolderPageView.SelectedPageChanged += ControlsHolderPageView_SelectedPageChanged;
        }

        private void ControlsHolderPageView_SelectedPageChanged(object sender, EventArgs e)
        {
            RadColorSelector selector = this.radColorBox1.ColorDialog.ColorDialogForm.RadColorSelector as RadColorSelector;
            if (selector.ControlsHolderPageView.SelectedPage.Text == "Professional")
            {
                Telerik.WinControls.UI.RadColorPicker.ProfessionalColors professionalColorsControl = selector.ControlsHolderPageView.SelectedPage.Controls[0] as Telerik.WinControls.UI.RadColorPicker.ProfessionalColors;
                ((RadSpinEditor)professionalColorsControl.Controls[0].Controls["numAlpha"]).Value = 255;
            }
        }

Please give it a try and see how it works for your case.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

James
Posted on: 28 Nov 2022 22:57

Hi Dess,

Thanks for getting back to me.

Thank you for the information provided.

Though regarding end users:

If the current colour is transparent & then the Professional Tab is selected

When a colour change is made (while colour = Transparent OR Alpha = 0)

while in the Professional tab the Alpha should default to 255

VS. the current functionality

As selecting OK will attempt to update the colour, however it will still be transparent

The Basic Tab already follows this logic

ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 28 Nov 2022 07:53
Hello, James,     

Thank you for the provided detailed steps and illustration. Please have in mind that along with the RGB values, the A value (alpha) is also important for the selected color and it can make the color transparent no matter the RGB values. Initially, when the dialog is opened the alpha is 255:

Thus, whatever color is selected, it will change the current selection. However, after following the described steps which result in changing the selection to Transparent on the Web tab, note that the alpha value is set to 0.

It is necessary to set the A value to 255 in this case. Please give it a try and see how it works on your end.

Let me know what is the observed result.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.