Re: User adjustable [VH]Boxes



Dirk Koopman wrote:

How do I get the nice adjustable Vertical or Horizontal separators like
one sees in things like evolution.

I have an app that has many windows arranged thus:-

window                   
-------------------------------------------------------------
window
------------------------------+------------------------------
window                        | window
                              |
                              |
------------------------------+------------------------------
window                        | window
                              |
                              |
------------------------------+------------------------------

I need the user to move all the separators around so they can resize the
windows how they want.
  

The 'paned' widgets, GtkVPaned and GtkHPaned are what you need. In
Gtk2-Perl, that's Gtk2::VPaned and Gtk2::HPaned. Some documentation
relating to both is at:
http://gtk2-perl.sourceforge.net/doc/pod/Gtk2/Paned.html

As a separate, but related, question: How do I get the positions and
other necessary information out of which ever widgets I need, so that I
can restore those positions on startup?
  

The default sizing layout is taken from the size requests of the widgets
you put inside the paned widgets. So if you want to save this stuff for
later, you'd get the sizes of individual widgets inside the paned
widgets, and then re-set them when you re-open the window.

-- 
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak nusconsulting com au
website: http://www.nusconsulting.com.au



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