Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

weirdness with fonts  RSS feed

 
zoe goddard
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've created a dialog that acts as a font chooser. It seems to work most of the time. The font style (bold, italic, etc) doesn't always update the text in the textfield (I also tried label) until I modify the size of the font. I even look at the font to see if it is set right (it is), and I've tried changing the text (try to make it use the current font - it doesn't).
For example it always seems to work for dialog, but never works for complex.
I have no idea why this is happening, let alone how to fix it.
Any ideas?
 
zoe goddard
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read somewhere that the graphics context uses the current font to draw with. I was wondering if this behavior could be due to this. Maybe the label's graphic context's font isn't always being updated with the latest value. If this is true then all I would have to do is override the paint.
Does this sound reasonable?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!