[Gtk-sharp-list] modifyFont problem

mrkane27 mrkane27 at yahoo.com
Sat Mar 14 07:34:11 EDT 2009


Hello,

Here goes:
I wanted to start learning to develop applications using Mono and GTK#, and
I figured a Sliding Puzzle game would do, as it involves a normal user
interface, plus dynamically creating controls at runtime (for the 4x4 button
matrix). Anyhow, I wanted the font size on the buttons a little bigger than
normal.

So, I eventually managed to use modifyFont to do that. However, I ran into
two different problems.

1) if I use modifyFont upon creating the buttons, what happens is that if a
button's Visible property is set to false (simplest solution to the missing
square in the Sliding Puzzle game) and then to true again, the font is
reset.

2) if I use modifyFont on a button every time it is made Visible again, to
fix problem 1), the memory used my application grows as the game is played.
Sounds like a memory leak somewhere, but I don't know enough about GTK to
figure out where. (I used a single instance of FontDescription, created at
program startup).

Any help would be appreciated.

Thanks,
Vlad
-- 
View this message in context: http://www.nabble.com/modifyFont-problem-tp22511103p22511103.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.



More information about the Gtk-sharp-list mailing list