From: Yuri Leikind Date: 2004-04-27T18:26:23+09:00 Subject: Re: FoX: how to set font for an FXTable item On Tue, 27 Apr 2004 00:38:24 +0900 Jim Moy wrote: > Yuri Leikind wrote: > > Is there a way to set font for a single FXTableItem ? FXTableItem does not > > have an appropriate method, there is only a way to set font for the whole > > FXTable, globally. > > Call FXTableItem.setItem on your subclass of FXTableItem, then twiddle > to your heart's content in drawContent. Perhaps you meant calling FXTable.setItem on my subclass of FXTableItem? Ok, I define my subclass of FXTableItem with drawContent : class MyTableItem < Fox::FXTableItem def drawContent(table, dc, x, y, w, h) dc.setTextFont(MY_FONT) dc.foreground = Fox::FXRGB(255, 240, 240) super(table, dc, x, y, w, h) end end and then, when creating the table: table.setItem(i, j, MyTableItem.new("hello")) But well, that doesn't work. Did I miss something? -- Best regards, Yuri Leikind