Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 02-01-2013, 10:52 AM   #1
Mario Blunk
Registered: Dec 2008
Location: Wild Eastern Germany
Distribution: Suse 9.x , 11.x, 12.1, 13.x
Posts: 127

Rep: Reputation: 21
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.



-- 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 (scrolled);

-- show textbox (textbox);

gdk.font.load (font => font, font_name => "Utopia");

-- display "box1" (box_back); (box_head); (box_selection); (window);

-- end of excerpt

Last edited by Mario Blunk; 02-01-2013 at 10:53 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
howto redirect command line to ada gtk.text_buffer ? Mario Blunk Programming 0 02-01-2013 12:44 PM
[SOLVED] Ada gtk on OpenSuse 12.x Mario Blunk SUSE / openSUSE 2 01-29-2013 10:48 AM
Help on GDK GTK+ programming varun_shrivastava Programming 0 05-07-2007 09:06 AM
how to get window from gdk to gtk? SciYro Programming 1 08-03-2004 09:01 PM
gtk , gdk ????? varunk123456 Linux - Software 7 04-03-2004 01:22 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:43 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration