I replied to the other thread, but I thought I'd reply to this one too. I have the same issue, and as was pointed by pirx67, it's because of the default Ubuntu theme. However I actually like the default theme and as such, I won't be changing it.
A possible solution is allowing users to customize every part of the Code::Blocks IDE (not just the syntax highlighting part).
Personally, I like dark backgrounds with light text and it would be great to be able to customize the entire IDE this way.