[fxruby-users] setting the font in FXText

Lyle Johnson lyle.johnson at gmail.com
Fri Aug 24 11:47:53 EDT 2007


On Aug 24, 2007, at 10:37 AM, Thomas, Jason M ((Software)) wrote:

> How do I set my font once I have already created the dialog box or is
> this possible?

You need to call create() on the font before you assign it:

     def set_font()
       font = FXFont.new(getApp(), "courier", 8)
       font.create
       @fxtext.font = font
     end

There's also an entry about this in the FOX FAQ (see http://www.fox- 
toolkit.org/).

Hope this helps,

Lyle


More information about the fxruby-users mailing list