Nevron Forum

NDataGridView scrollbar painting issue

https://www.nevron.com/Forum/Topic6058.aspx

By Brad Swearingen - Tuesday, January 24, 2012

I'm using the NDataGridView and have noticed that the horizontal and vertical scrollbars sometimes do not draw themselves using the current skin/scheme.  This is easily reproduced by clicking and dragging the scrollbar thumb to scroll and letting it go.  A subsequent mouse move over the scrollbar will cause it to paint back to the current skin/scheme.  The NListView doesn't have this problem that I can tell.

I added some code to get the grid scrollbars and look for the scroll events on it.  Setting a 250 msec timer during this event on which I invalidate the scrollbar helps but doesn't completely fix all scenarios.

I was wondering if there might be a better way to work around this issue today?

By Nevron Support - Wednesday, January 25, 2012

Hello Brad,

On Windows 7 with theme different than Windows Classic and if the application is with enabled visual styles we are not able to paint our scrollbars on the top of some parent control scrollbars correctly.

We cannot find any solution of the problem yet.

By Brad Swearingen - Wednesday, January 25, 2012

Thanks, I should have thought to try disabling visual styles.  It would be great if you could provide a document which explains the various known issues with using and not using visual styles.  Providing recommendations where it makes sense as to what should be done on the various platforms.  I suspect there is no clear direction but knowing all the issues could help users make the best decisions.