This is a migrated thread and some comments may be shown as answers.

checkbox indeterminate wrong image

12 Answers 163 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 03 Dec 2010, 08:14 PM
I have the checkbox control set to isthreestate=true. In design mode when I toggle the states for their initial values, the image is correct. However, in run-mode, the image for checked and indeterminate both show the check mark. In the ToggleStateChanging event the property is correct, but visibly it is incorrect. (To recap, both ToggleState.Inderminate and ToggleState.On show the check mark.)

This happens with all of the built-in themes. I'm on a machine with Windows 7, 64-bit.

Did a search but didn't find anything. Ideas?

12 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 04 Dec 2010, 10:08 AM
Hi Jim,

Under the default theme, with the latest 2010 Q3 release I haven't been able to replicate this.

However, what theme are you using for the application as I notice that the intermediate state in both design and run time is not correct (or at least not obvious) for Desert theme.

Thanks
Richard
0
Jim
Top achievements
Rank 1
answered on 06 Dec 2010, 01:55 PM
In design mode I am not selecting any theme explicitly, so I assume it's using the default theme.

At run-time the problem occurs with all themes including "Breeze" and "Aqua." I'm setting the theme at run-time using this code:

       
ThemeResolutionService.ApplicationThemeName = "Aqua";


0
Richard Slade
Top achievements
Rank 2
answered on 06 Dec 2010, 02:21 PM
Hi Jim,

I've had a look through the Public Issue tracking System and I see that this is an outstanding issue. You can vote for the issue which may help it to be addressed quicker. You can find the issue here

Hope that helps
Richard
0
Jim
Top achievements
Rank 1
answered on 06 Dec 2010, 02:23 PM
OK, I voted. But how is this a "feature request?" This is a straight-out bug.

Do you have a suggestion for a workaround?
0
Richard Slade
Top achievements
Rank 2
answered on 06 Dec 2010, 02:35 PM
Hi again Jim,

Even though this issue is in the Public Issue Tracking system, I have tried this in a fresh project and I am still unable to replicate your issue. (See screenshot) Can you confirm which version you are on, and if you are not on the latest version, I suggest upgrading to the newest version (Q3 2010)

Hope that helps
Richard
0
Jim
Top achievements
Rank 1
answered on 06 Dec 2010, 02:41 PM
The version I have is Telerik RadControls for WinForms Q3 2010, 186 MB, 10.3.1110.0

Thanks
0
Richard Slade
Top achievements
Rank 2
answered on 06 Dec 2010, 02:50 PM
Hi Jim,

I've been unable to replicate your issue using the default theme in any project so far. As you can see from the screenshot above, the intermediate checkbox is showing correctly.
Can you also check the versions of the assemblies that you project is using, and that the GAC has all the latest versions (and no old ones) too.

If you could post a code sample to replicat this though, I'll be happy to take a look at it for you.
thanks
Richard
0
Jim
Top achievements
Rank 1
answered on 06 Dec 2010, 03:40 PM
The versions of your controls in the GAC are 2010.3.10.1109

There is zero code that I can post other than the one line I showed above that sets the ApplicationThemeName. I'm not using any explicit code otherwise. I just put the 3-state radcheckbox on the form, and it doesn't work correctly at run-time. I'm not sure what else I can add.

When I don't use any theme at all, it does work correctly (I guess using the default theme.)

I need this to work when specifying a non-default theme.
0
Richard Slade
Top achievements
Rank 2
answered on 06 Dec 2010, 03:56 PM
Hello Jim,

For the Aqua Theme, I'm afraid I don't have a workaround for you. For the Breeze Theme, you should be using the newer BreezeExtended theme as the Breeze theme is now out of date. The Breeze Extended theme correctly works with intermediate state.

Hope that helps
Richard
0
Jim
Top achievements
Rank 1
answered on 06 Dec 2010, 04:01 PM
BreezeExtended does appear to work. Hokay, that's that I guess. I'll be using a standard Windows Check box until you fix yours then.
0
Richard Slade
Top achievements
Rank 2
answered on 06 Dec 2010, 04:09 PM
Hello Jim,

Attached is a screenshot of BreezeExtended checkbox on a widows form. I have also added the following code to the Load event of the form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    ThemeResolutionService.ApplicationThemeName = "BreezeExtended"
End Sub

If you need further help, just let me know.
For information, I don't work for Telerik. I'm just another forum user like yourself trying to help.
All the best
Richard
0
Nikolay
Telerik team
answered on 10 Dec 2010, 04:56 PM
Hi guys,

Richard, thank you for your assistance.

Jim, at the time when the Aqua theme was created, there was no support for a threestate checkmark. Recently, we introduced a new theming mechanism and we switched most of the predefined themes to it. Aqua, Telerik, Vista and Breeze themes, however, are not updated according to the new styling rules.
We plan to update Aqua and Telerik themes in one of our next versions. As to the Vista and Breeze themes, please consider them as obsolete and use Windows7 and BreezeExtended accordingly.

In regards to your specific question about the Aqua theme, as I mentioned above, it is not supported by the the theming mechanism. However, you can modify the FillPrimitive of the checkbox which will allow you to distinguish the On state from the Intermediate one. For better understanding, I am attaching a sample project where the modification is applied. If you decide that this theme is suitable for your application, you should load it in your project as described here.

I hope this helps.

Greetings,
Nikolay
the Telerik team
Get started with RadControls for WinForms with numerous videos and detailed documentation.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Jim
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Jim
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or