LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   GTK widget which to use? (http://www.linuxquestions.org/questions/programming-9/gtk-widget-which-to-use-417518/)

cranium2004 02-20-2006 08:59 AM

GTK widget which to use?
 
hello,
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?

burntfuse 02-20-2006 01:29 PM

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.


All times are GMT -5. The time now is 01:19 AM.