Gtk's Global ( was: (no subject))



Hi Christian ( and ye' all ;-) ,

Au jour dit , 12 May 2002 15:27:24 +0200 ,
Christian Borup <borup borup com> s'exprima ainsi:
I'd like to know if there are functions that could help you to set up 
a kind of a log for a widget : for an option menu , which menu item
was 'activate'
last , for a combo the last strings entered in the entry , for a clist
which rows were selected last , etc ?

I'm not sure what you are asking here...
I guess you could keep the data in the widget itself (see further down).
The idea is to have a small module that would be just another layer above Gtk , that would settle a few 
things automatically :
when you create a window -> automatically add a signal_connect("delete_event",\&ByeBye);
when you create a CList ->automatically add a signal_connect("select_row",sub{"increment the log of the 
widget";}); 
when you create a Combo ->automatically add a $combo->entry(signal_connect("activate",sub{"increment the log 
of the widget";});
etc...
This way , it's easy in the script , for instance , to set what the popdown strings of a combo must be ... To 
have the last selection in a clist , you just lookup in its log .

What you indicated , putting data in the widget is fine ( thanks for that ) , but i still need extra space 
for some data that's beyond the scope a single widget . Must i create a global or can i use one of GTk's ( if 
there's any ) ?


In the same idea , how do you know the number of rows in a clist ? 

$clist->rows should do the trick.
It did , thanks . But what is this nowhere to be found , even in the C documentation ?

Stephen Wilhelm has written a really good tutorial:
    http://personal.riverusers.com/~swilhelm/gtkperl-tutorial/
I know this tutorial , it's my bible : always open in one of my virtual desktops ...
But about Gnome ?
    
Also "perldoc Gtk::cookbook" will give you a few of the basics.
I'll try this . 

Thanks.

 
./borup
D vid 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]