-   Programming (
-   -   GTK widget which to use? (

cranium2004 02-20-2006 08:59 AM

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?

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:45 PM.