LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 02-01-2013, 10:52 AM   #1
Mario Blunk
Member
 
Registered: Dec 2008
Location: Wild Eastern Germany
Distribution: OpenSuse Tumbleweed
Posts: 131

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.

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.
 
  


Reply


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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:51 AM.

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