in reply to Please reccomend a Windows Rad for Gui Programs (form designer?)

I would suggest using the Glade Gui layout tool. Google for "Glade designer". It does what you want, and will let you write Perl/Gtk2 code, which is about the most active/advanced stuff now for Perl-based GUI's. Another neat thing about Glade, is it produces xml files that can be converted to a slightly different form suitable for use with Gtk2::Builder, (which is a new Gtk2 module that essentially builds xml-based design support right into Gtk2). So you can design with Glade, convert the glade-xml to builder-xml with the "gtk-builder-convert" utility . See builder-libglade faq

The Latest CamelBox has Glade may interest you.

Here is a simple example from the Perl/Gtk2 maillist. The xml in the following, can be made with the glade designer, and converted with gtk-builder-convert

#!/usr/bin/perl use strict; use warnings; use Glib ':constants'; use Gtk2 -init; use Gtk2::SimpleList; =head1 > How can I paste the clipboard (with Control + V) over a gtktreeview + > widget (list) ? > Any idea? So far as i know, you create a key binding (e.g. with a menu item), and then in the handler for that command, pull data from the clipboard + and do the appropriate list insertions. Instead of spamming the message with lots of boilerplate code to set up the accelerators and all that, here's a bunch of GtkBuilder XML. The interesting part is the on_paste() callback, near the end, which just grabs the clipboard contents as plain text, splits by whitespace, + and inserts each item as its own line. In a real app, you'd do more appropriate parsing and marshaling and whatnot. =cut # by muppet on maillist # # Gtk2::Builder is cool. Now we can express the shortcuts and menu it +ems # and all that as data instead of as tedious code. # my $interface = '<interface> <object class="GtkUIManager" id="uimanager"> <child> <object class="GtkActionGroup" id="actions"> <child> <object class="GtkAction" id="file-menu"> <property name="label">_File</property> </object> </child> <child> <object class="GtkAction" id="quit"> <property name="stock-id">gtk-quit</property> <signal name="activate" handler="on_quit" /> </object> </child> <child> <object class="GtkAction" id="paste"> <property name="stock-id">gtk-paste</property> <signal name="activate" handler="on_paste" /> </object> </child> <child> <object class="GtkAction" id="clear"> <property name="stock-id">gtk-delete</property> <signal name="activate" handler="on_clear" /> </object> </child> </object> </child> <ui> <menubar name="menubar"> <menu action="file-menu"> <menuitem action="paste"/> <menuitem action="clear"/> <menuitem action="quit"/> </menu> </menubar> </ui> </object> <object class="GtkWindow" id="window"> <property name="default-width">250</property> <property name="default-height">500</property> <signal name="destroy" handler="on_window_destroy" /> <child> <object class="GtkVBox" id="vbox"> <child> <object class="GtkMenu" constructor="uimanager" id="menubar +" /> <packing> <property name="expand">false</property> </packing> </child> <child> <object class="GtkScrolledWindow" id="scroller"> <property name="hscrollbar-policy">automatic</property> <property name="vscrollbar-policy">automatic</property> <child> <object class="GtkTreeView" id="treeview"> <property name="headers-visible">false</property> </object> </child> </object> </child> </object> </child> </object> </interface>'; my $builder = Gtk2::Builder->new (); $builder->add_from_string ($interface); $builder->connect_signals (); my $slist = Gtk2::SimpleList->new_from_treeview ( $builder->get_object ('treeview'), Words => 'text', ); $builder->get_object ('window')->show_all; Gtk2->main; sub on_window_destroy { Gtk2->main_quit } sub on_quit { $builder->get_object ('window')->destroy; } # # Here's the interesting part. # sub on_paste { my $clipboard = Gtk2::Clipboard->get_for_display ($builder->get_object ('window')->get_display (), Gtk2::Gdk->SELECTION_PRIMARY); my $text = $clipboard->wait_for_text (); foreach (split /\s+/, $text) { push @{ $slist->{data} }, $_ if length; } } sub on_clear { @{ $slist->{data} } = (); } __END__

I'm not really a human, but I play one on earth Remember How Lucky You Are
  • Comment on Re: Please reccomend a Windows Rad for Gui Programs (form designer?)
  • Download Code