-
Apr 21st, 2018, 10:17 AM
#1
Thread Starter
Fanatic Member
Change DataGrid BackColor
Hello VbForums
Is it possible to change the default backcolor of the datagrid control.
I'm not referring to the rows but the unused part of the datagrid control.
Thank you
-
Apr 21st, 2018, 10:46 AM
#2
Re: Change DataGrid BackColor
As far as I know - no, not without subclassing and overriding the WM_PAINT events to draw it yourself.
-
Apr 21st, 2018, 01:43 PM
#3
Thread Starter
Fanatic Member
Re: Change DataGrid BackColor
Originally Posted by LaVolpe
As far as I know - no, not without subclassing and overriding the WM_PAINT events to draw it yourself.
Thank you
I was almost sure that without subclassing this is not possible.
I wonder if someone has got a sample.
-
Apr 21st, 2018, 02:28 PM
#4
Re: Change DataGrid BackColor
From memory, when I've seen posts like this in the past, the most common answer was to use another grid control. However, many of those would suggest custom ownerdrawn controls like LynxGrid (PlanetSourceCode) and SGrid (I think that's from vbAccelerator), and others. Could be an option I suppose. I personally have used the datagrid and don't find its color scheme horrible and still professional looking. That's just my opinion though.
I'd guess that the DataGrid may use the simple DrawFrameControl API which isn't theme aware AFAIK - hence the simple gray backcolor and row selector arrows as black.
-
Apr 21st, 2018, 04:59 PM
#5
Thread Starter
Fanatic Member
Re: Change DataGrid BackColor
Seems amusing this LynxGrid
I'll give it a try.
Thanks a lot
-
Apr 23rd, 2018, 07:32 AM
#6
Re: Change DataGrid BackColor
I would use an mshflexgrid or Krool's VBFlexGrid which is still in active development --> http://www.vbforums.com/showthread.p...xGrid-control)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|