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

In reply to Re: Please reccomend a Windows Rad for Gui Programs (form designer?) by zentara
in thread Please reccomend a Windows Rad for Gui Programs (form designer?) by BobFishel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.