Share your knowledge at the LQ Wiki.
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-20-2006, 09:59 AM   #1
Registered: Feb 2004
Distribution: FC4,RHEL4
Posts: 223

Rep: Reputation: 30
GTK widget which to use?

I want to use a widget that will be text windows and it will have capability to clear its text area. which is that? also how can i redirect output of any terminal command to that text window? say if i clik on button then how can i display output of ls command there in text area widget?
Old 02-20-2006, 02:29 PM   #2
Registered: Sep 2005
Location: Laurel, MD, USA
Distribution: Slackware 10.1, FC5
Posts: 164

Rep: Reputation: 30
The GtkTextView widget should do what you're looking for. As for the commands, use g_spawn_command_sync (or something like that), which has an option for directing the output to a buffer, IIRC. You can then have the program read the output and write it to the TextView widget.


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
Gtk widget problem iali Linux - General 0 01-21-2006 01:56 AM
GTK widget appearance neiljmac Linux - Software 1 12-25-2004 07:43 AM
Getting a widget GTK programming goelvish Programming 5 08-31-2004 06:30 AM
Which GTK Widget to use? jpbarto Programming 0 11-20-2003 08:34 PM
what is a gtk-widget ? gladeiator Programming 3 10-30-2003 06:34 PM

All times are GMT -5. The time now is 07:59 AM.

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