Hi!
As i'm coming from mfc i know there is a way to change to look&feel of a listcontrol and want to do it in wx for all platforms. I checked the wxRendererNative class and the sample "render" in the samples directory but i'm more confused than ever and need help with it, please.
I want to change the height of the columnheader and also the backgroundcolor and the textcolor of the columnheader. Is it possible with wx or must i create an own control.
Here is an example:
http://www.holdemmanager.net/images/scr ... _large.jpg
Hope to get helped.
Thank you!
Change the look of wxListCtrl Topic is solved
-
- I live to help wx-kind
- Posts: 192
- Joined: Fri Dec 22, 2006 9:17 am
- Location: Germany
- Contact:
-
- wxWorld Domination!
- Posts: 1059
- Joined: Sun Dec 30, 2007 6:40 pm
- Location: Canada
Hi,
Which part of the screenshot would you like to use wxListCtrl for?
For the main section with the players, etc., I would be inclined to use wxGrid, it allows you to render whatever you would like in each cell.
See http://docs.wxwidgets.org/stable/wx_wxgrid.html#wxgrid and also the sample in your samples folder.
Hope that helps,
Jim
Which part of the screenshot would you like to use wxListCtrl for?
For the main section with the players, etc., I would be inclined to use wxGrid, it allows you to render whatever you would like in each cell.
See http://docs.wxwidgets.org/stable/wx_wxgrid.html#wxgrid and also the sample in your samples folder.
Hope that helps,
Jim
OS: Vista SP1, wxWidgets 2.8.7.
-
- I live to help wx-kind
- Posts: 192
- Joined: Fri Dec 22, 2006 9:17 am
- Location: Germany
- Contact:
It should look like one in player summary. With headers and footers if possible. Data should be sorted, too. I think sorting is a feature which is not available in a wxGrid...or am i wrong?
Can i change the color of the columnheader in a grid?
And is it possible to find out if a columnheader was clicked?
Thank s for your help so far
Can i change the color of the columnheader in a grid?
And is it possible to find out if a columnheader was clicked?
Thank s for your help so far
Yes, I believe you would need to implement any sorting on your own.extreme001 wrote:It should look like one in player summary. With headers and footers if possible. Data should be sorted, too. I think sorting is a feature which is not available in a wxGrid...or am i wrong?
Yes, you can change the label background color, text color and font.extreme001 wrote:Can i change the color of the columnheader in a grid?
There are events for label clicks.extreme001 wrote:And is it possible to find out if a columnheader was clicked?
Thank s for your help so far :-)
-
- wxWorld Domination!
- Posts: 1059
- Joined: Sun Dec 30, 2007 6:40 pm
- Location: Canada
Hi,
My understanding is that the background color needs to be the same for all column labels, i.e. you can't have a different color for each column label.
As Tim points out, you can do your own sorting. Depending on how your data is stored, it can be quite straight forward.
You could use wxArrayPtrVoid to store the data or use STL list. Both support a sort function.
Hope that helps,
Jim
My understanding is that the background color needs to be the same for all column labels, i.e. you can't have a different color for each column label.
As Tim points out, you can do your own sorting. Depending on how your data is stored, it can be quite straight forward.
You could use wxArrayPtrVoid to store the data or use STL list. Both support a sort function.
Hope that helps,
Jim
OS: Vista SP1, wxWidgets 2.8.7.
-
- I live to help wx-kind
- Posts: 192
- Joined: Fri Dec 22, 2006 9:17 am
- Location: Germany
- Contact:
-
- Super wx Problem Solver
- Posts: 264
- Joined: Mon Aug 07, 2006 3:25 pm
- Location: Baia Mare, Romania
- Contact: