gdk.font in Ada Gtk
Hello friends,
can anyone give me an example of how to set the font in an Ada program ? Currently I'm working with these lines (excerpt):
The line below the one that reads "-- SET FONT" is the issue. It does not affect the text "dummy" displayed in the text_view. What is wrong ? Thank you for your help.
Best,
Mario
-- create a text buffer
gtk.text_buffer.gtk_new (textbuf);
-- create a textbox with the text buffer inside
gtk.text_view.gtk_new (textbox, textbuf);
-- set size of textbox
gtk.text_view.set_usize (textbox, 400, 100);
-- disable editing of the textbox
gtk.text_view.set_editable (textbox, false);
-- pack textbox into scrolled window
gtk.scrolled_window.add (scrolled, textbox);
-- set startup text
gtk.text_buffer.set_text (textbuf, " dummy ");
-- show scrolled window
gtk.scrolled_window.show (scrolled);
-- show textbox
gtk.text_view.show (textbox);
-- SET FONT
gdk.font.load (font => font, font_name => "Utopia");
-- display "box1"
gtk.box.show (box_back);
gtk.box.show (box_head);
gtk.box.show (box_selection);
gtk.window.show (window);
gtk.main.main;
-- end of excerpt
Last edited by Mario Blunk; 02-01-2013 at 10:53 AM.
|