Re: 5 gui's launched from 1.
- From: Muthiah Annamalai <dearestchum yahoo co in>
- To: sabarmathi p <agni_success yahoo co in>, gtk-app-devel-list gnome org
- Cc:
- Subject: Re: 5 gui's launched from 1.
- Date: Sat, 25 Jun 2005 09:28:32 -0700 (PDT)
Hello!
hi!!! I got ur mail id from gtk-app-devel-list gnome
org.
Please keep future posts on the Gtk-App-Devel lists.
It will benefit more people, and keep my answers
correct and under scrutiny from others. I appreciate
your mails on gtk-app-devel-list. Respect this.
I have a doubt in GTK, could u please help me.
Sorry if ive disturbed u.
As I have time, I will.
1) I have created 5 buttons.When i click the first
button a test area should open to the right side of
the window describing its detials, then when i click
next button the previous details should exit and
this
button details should appear.
Your question is too broad. Read gtk-tutorials
from gtk.org and please narrow down your question
to specific issues.
2) I have created 6 GUI's. I want to link all the
GUI's.From the main GUI, i want to go to other
GUI's.
Just assume you have a functions to return you
a widget pointer, taking the GUI ID you want.
GtkWidget * launch_gui(int gui_id)
{
switch(gui_id)
{
case 1:
return create_text_widget();
case 2:
return create_tree_view();
case 3:
return create_gnome_widget();
/* and so on... */
}
}
Connect each of your five buttons like this.
g_signal_connect(G_OBJECT(btn),"clicked",
G_CALLBACK(ButtonCB), ${BUTTON_NUM})
replace $(BUTTON_NUM} with the number
for every diff button.
Now call this function from your main() function,
and add the widgets to your button callbacks
like this.
void ButtonCB(GtkButton *b,gpointer data)
{
/* Invoke corresponding GUI based on button no,
you set in g_signal_connect() earlier */
gtk_widget_show(launch_gui(G_POINTER_TO_INT(data));
return;
}
Again, I cannot much help you as your questions
are very broad.
Cheers
Muthu.
__________________________________
Discover Yahoo!
Have fun online with music videos, cool games, IM and more. Check it out!
http://discover.yahoo.com/online.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]