checkbox indeterminate wrong image

13 posts, 0 answers
  1. Jim
    Jim avatar
    8 posts
    Member since:
    Nov 2010

    Posted 03 Dec 2010 Link to this post

    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?
  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 04 Dec 2010 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Jim
    Jim avatar
    8 posts
    Member since:
    Nov 2010

    Posted 06 Dec 2010 Link to this post

    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";


  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 06 Dec 2010 Link to this post

    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
  6. Jim
    Jim avatar
    8 posts
    Member since:
    Nov 2010

    Posted 06 Dec 2010 Link to this post

    OK, I voted. But how is this a "feature request?" This is a straight-out bug.

    Do you have a suggestion for a workaround?
  7. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 06 Dec 2010 Link to this post

    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
  8. Jim
    Jim avatar
    8 posts
    Member since:
    Nov 2010

    Posted 06 Dec 2010 Link to this post

    The version I have is Telerik RadControls for WinForms Q3 2010, 186 MB, 10.3.1110.0

    Thanks
  9. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 06 Dec 2010 Link to this post

    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
  10. Jim
    Jim avatar
    8 posts
    Member since:
    Nov 2010

    Posted 06 Dec 2010 Link to this post

    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.
  11. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 06 Dec 2010 Link to this post

    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
  12. Jim
    Jim avatar
    8 posts
    Member since:
    Nov 2010

    Posted 06 Dec 2010 Link to this post

    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.
  13. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 06 Dec 2010 Link to this post

    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
  14. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 10 Dec 2010 Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready