[fxruby-users] Can't add text to FXCanvas

Lyle Johnson lyle at knology.net
Thu Dec 1 07:52:40 EST 2005

On Nov 30, 2005, at 9:59 PM, <boxofsoxx-goognews at yahoo.com> wrote:

> I have a ruby program that uses a FXCanvas, and I have attached a 
> FXDCWindow
> to control it. It lets me draw lines, rectangles and ellipses, but not 
> text.
> If I attempt to draw text, I get the following error...

You need to call create() on the font object before you can use it. I 
recommend adding this in your PlotterWindow#create method, i.e.

	def create

Please see the FAQ (at http://www.fox-toolkit.com/faq.html#ILLEGALICON) 
for more information on this.

Hope this helps,


More information about the fxruby-users mailing list