On 08.07.2010, at 23:59, Alexander Walz wrote:

> I am currently combining the editor and fonts test files (test/editor.cxx & 
> test/fonts.cxx) shipped with FLTK 1.1.10 to allow the user to define a 
> different font and font size in realtime for the text she/he entered into the 
> editor. I use Windows XP.
> 
> I managed to assign the new values the user chose to the textfont and 
> textsize properties of the EditorWindow object and also call the 
> redisplay_range and redraw methods.
> 
> However, the font and its size won't change. From similar messages in this 
> forum and the Net I see that a callback function must be invoked.

The "textfont" and "textsize" variables only set the default font. The "editor" 
example however shows how to assign multiple fonts using a style table. If you 
disable the style table, your code will work as expected. If you want to keep 
the style table, you must change the table entries for all fonts that you want 
changed.

 - Matthias
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to