Scrollbar rendering error using Custom Themes

Posted by: aruud on 27 July 2020, 12:55 pm EST

  • Posted 27 July 2020, 12:55 pm EST

    Hey support,

    My company wanted to redo the look of the applications I support, so I looked around and found the C1Theme designer. After wrestling with it for some time, I made a theme that worked pretty well. After applying it to my applications, however, something has gone wrong with the way the scrollbars render on the C1FlexGrid.

    When the scrollbars are needed (i.e. the grid is made small enough), they take a copy of the pixels present where the scrollbar should be and never update. The scrollbar underneath is still functional. I've included a video of the behavior in the attachments. It's also perfectly repeatable, and applies across many instances of the grid.

    I don't believe the theme itself is part of the problem, since I've made a dummy application where the scrollbars work just fine (also included for the sake of completeness).

    Can you suggest any place I should start looking to correct this behavior? My applications have a fairly low memory impact, and I don't interfere with the rendering directly, only through setting themes and settings of the columns. It appears to be related to something that affects the project as a whole since a new test grid I added to a random form also exhibits the behavior.

    Thanks for reading,

    PS. It appears the dropdowns selecting the specifics of the control and environment are broken on the ticket submission page, which is why I am submitting this here. I am running 64-bit Windows 8.1 Pro, developing in VS 2015 (Version 14.025431.01 Update 3). I'm using WinForms C1FlexGrid in the 4.0.20201.416 build. If there's any other information you need, don't hesitate to ask.
  • Replied 27 July 2020, 12:57 pm EST

    Apologies, looks like the attachments didn't take the first time.
  • Replied 27 July 2020, 5:46 pm EST

    Hi Alex,

    It is very strange and we never came across this kind of issue before.
    Are you facing the issue the issue with any other predefined theme?

    If possible can you please share a stripped down sample of your application with the dummy data, replicating the issue so that we can replicate the same issue at our end and assist you accordingly.

    Prabhat Sharma.
  • Replied 31 July 2020, 3:44 am EST

    Hi Prabhat,

    I did not encounter the issue using the predefined themes. I can switch back to Office2007Blue right now and the scrollbars will be acting normally.

    I've cut down the project to it's basics and removed the need for an exterior database (i.e. one form and removing over 75% of the code from that form). The only things remaining are elements that I believed could apply to the issue at hand. You'll need to fix the reference to CommonForms.dll (which I've included), which contains an extended version of the C1FlexGrid I've used before without issue. The extension is entirely focused around a crude Undo/Redo method, and should not affect rendering. I also included my custom theme for completeness.

    In the process of cutting out libraries I thought might be unnecessary, I removed the Microsoft Library "Presentation Core", then re-built my application to see if it still ran. Surprisingly, the scrollbars worked normally, so there's some interaction between this library and the C1 custom themes that causes the weird behavior. I'll be reviewing my full application to see if I can simply remove this library and move on, but I'd like to keep diagnosing in case it turns out to be needed.

  • Marked as Answer

    Replied 30 July 2020, 9:49 pm EST


    Your case has been replied on the given link:

    Please continue the thread there only.

    Prabhat Sharma.
  • Replied 5 August 2020, 5:27 am EST

    The issue ended up being difficult to recreate. If anyone finds this in the future, check if your project is referencing the Microsoft library "PresentationCore" (Version v4.0.30319 on my computer). When I removed the reference to that library, the scrollbars worked correctly again.
Need extra support?

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

Learn More

Forum Channels