Author Topic: wxListCtrl problem (off topic)  (Read 5215 times)

Offline nacitar

  • Multiple posting newcomer
  • *
  • Posts: 27
wxListCtrl problem (off topic)
« on: March 15, 2006, 09:48:22 pm »
i posted it on the wxforum, and was wondering if i could get any help with this.  I'm using the latest CVS of wxWidgets.

In a nutshell, my report view wxListCtrl will not show the column headings after i have resized the columns.  The column headings show
right when it shows and DURING the resizing, but not after i release the mouse.  Oddly, the text also shows up if i double click the column
sizer handle and let it autosize like that (but of course, it vanishes when i resize it again).  Any ideas?

here's the link:
http://wxforum.shadonet.com/viewtopic.php?p=32169#32169
Jacob McIntosh - Software Developer

Offline nacitar

  • Multiple posting newcomer
  • *
  • Posts: 27
Re: wxListCtrl problem (off topic)
« Reply #1 on: March 18, 2006, 03:19:27 am »
I fixed it... In the sample code (with no image list) they do itemCol.SetImage(-1)  for the list items.  With that, the column headings would only show up in the default positions/sizes and WHILE sizing... However, with an xp theme enabled the text simply never showed up.  The default "image" is 0, and doing itemCol.SetImage(0) or leaving it alone fixed  the entire problem.  So yeah, -1 is not really a good value... At least on windows xp SP2 with the latest cvs of wxwidgets.  Though noone replied to this post, thought i'd share my solution for everyone to gain from.


Edit: upon further investigation, making _any_ call to SetImage (even zero) will break the column headings.  So, if you have no image list, DONT call SetImage.
« Last Edit: March 18, 2006, 03:22:47 am by nacitar »
Jacob McIntosh - Software Developer