Proper CheckBox sizes in High DPI environment

Posted by: kbj on 19 March 2020, 6:02 am EST

  • Posted 19 March 2020, 6:02 am EST - Updated 3 October 2022, 2:28 pm EST

    Using the latest version of the winforms c1inputpanel and c1checkboxes I am unable to get propery sized checkboxes in a high (150%) DPI environment.

    As below:

  • Posted 19 March 2020, 4:20 pm EST - Updated 3 October 2022, 2:28 pm EST

    Hi Kingman,

    Sorry but we can not replicate the issue at our end, please see the attached GIF showing the same.

    If you are doing something else as shown in GIF then please let us know and modify the sample accordingly.

    Regards,

    Prabhat Sharma.

    InputPanelCheckBoxDemo.zip

  • Posted 22 March 2020, 9:54 am EST

    Hi Prabhat,

    Did you include a C1ThemeController on your form (and set theme of the input panel and C1Checkbox)? And are you developing and deploying in the higher DPI?

    That may be causing the issue.

    Kingman

  • Posted 22 March 2020, 7:35 pm EST

    Hi Kingman,

    I have also tried by using C1ThemeController but didn’t face any issue too.

    Please let us know the steps that need to be followed to replicate the issue with the stripped-down sample.

    Also, share the DPI level at which you are getting the issue.

    Regards,

    Prabhat Sharma.

  • Posted 23 March 2020, 1:29 am EST - Updated 3 October 2022, 2:28 pm EST

    Hi Prabhat

    Here’s a demo. I am developing and running the app at 144 dpi. Remember to set the startup object to sub Main

    tinyCheckBox.zip

    I get:

  • Posted 23 March 2020, 4:32 pm EST

    Hi Kingman,

    Thank you for the sample and we can observe the issue with that so escalated the case to the developers.

    [Internal Tracking ID: 426983]



    Regards,

    Prabhat Sharma.

  • Posted 13 May 2020, 11:42 pm EST

    Prabhat,

    Is this going to be fixed?

    -Kingman

  • Posted 14 May 2020, 12:14 am EST

    Hi Kingman,

    As per the devs, currently it is limitation of c1inputPanel and for the time being you can use the following workaround:

    Public Sub Main()
          'dpi awareness
          If Environment.OSVersion.Version.Major >= 6 Then
              SetProcessDPIAware()
          End If
          Application.EnableVisualStyles()
          Application.SetCompatibleTextRenderingDefault(False)
          'load main form
          Dim f = New Form1
          ' workaround for C1InputPanel
          Dim isi = CType(f.C1InputPanel1, ComponentModel.ISupportInitialize)
          isi.BeginInit()
          Using g = f.C1InputPanel1.CreateGraphics()
              f.C1InputPanel1.DesignScaleFactor = g.DpiX / 96.0F
          End Using
          isi.EndInit()
    
          Application.Run(f)
      End Sub
    

    We are forwarding this as an enhancement request to get it added in the control in the future.

    Regards,

    Prabhat Sharma.

  • Posted 14 May 2020, 3:41 am EST

    Hi Prabhat,

    As I pointed out in the first post, changing the design scale factor as per your recommendation above also rescales other graphical components (eg. InputTrackBar) with undesired results. Again, this is not an enhancement for a control to work as it should. I can’t believe having tiny check boxes is part of the existing design spec. Also, the above workaround does not address the odd things happening with the C1CheckBox control.

    -Kingman

  • Posted 14 May 2020, 5:15 pm EST

    Hello Kingman,

    >>changing the design scale factor as per your recommendation above also rescales other graphical components &the above workaround does not address the odd things happening with the C1CheckBox control.

    Sorry for the inconvenience.

    I too can observe both the issues at our end and updating the developers for the same and requesting them to get it fixed soon.

    Regards,

    Prabhat Sharma.

  • Posted 1 October 2020, 7:17 am EST

    There does not appear to be a solution for this in the latest release

  • Posted 4 October 2020, 11:03 pm EST

    Hello Kingman,

    As per the developers, the fix will be available in the next major release i.e. 2020V3 release.

    Regards,

    Prabhat Sharma.

  • Posted 16 December 2020, 8:43 am EST

    This is not fixed as promised in the 2020V3 release.

  • Posted 16 December 2020, 9:02 pm EST - Updated 3 October 2022, 2:28 pm EST

    Hello Kingman,

    Sorry, we do not face the issue at our end with the higher DPI. Please see the attached screenshot for reference.

    If you are still facing the issue then please share a stripped-down sample replicating the issue.

    Regards,

    Prabhat Sharma.

  • Posted 17 December 2020, 12:57 am EST

    There is a stripped down version in this forum entry (23 March 2020) called

    tinyCheckBox.zip. Change all the c1 references to Specific Version False and run the example on a high dpi machine.

  • Posted 18 December 2020, 1:02 am EST

    . . . Also I would point out your above example does not appear to be running in high DPI, note the fuzzy look of the characters.

  • Posted 20 December 2020, 10:20 pm EST

    Hello,

    We are discussing this with the developers and will get back to you with the updates soon.

    Regards,

    Prabhat Sharma.

  • Posted 21 December 2020, 3:05 pm EST - Updated 3 October 2022, 2:28 pm EST

    Hello,

    As per the developers the Size of the checkbox is fixed in the 2020V3 release and the icon is scaled to dpi.

    Please see the attached screenshot and let me know if we are missing anything.

    Note: The Developers are planning for hdpi icons for this control but the current version has 16px only.

    Regards,

    Prabhat Sharma.

  • Posted 22 December 2020, 4:28 am EST

    I think we can agree that the scaled icon in the input panel version looks very bad. Please note that the C1CheckBox does NOT scale the check in a high dpi environment. what it does do is incorrectly locate it and draw the box too large. As you can see the standard VS CheckBox draws the check and associated box correctly.

    In the example above you are using the workaround provided in the May 14, 2020 reply. This workaround causes a bunch of other scaling problems and should be ignored.

    Why are we to believe the developers this time after the have not done what they said they were going to on all the previous occasions having to do with this matter?

    -Kingman

  • Posted 22 December 2020, 8:41 pm EST

    Hello,

    Your case has been replied nothe given link:

    https://supportone.componentone.com/home/casedetail/470137

    Please continue the thread there only.

    Regards,

    Prabhat Sharma.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels