General widget sizing question 
Author Message
 General widget sizing question

Apologies if this is common knowledge and I just don't know it.

Is it possible when using something like a Tk::Table to have its size
depend on the size of the widget it's packed into?  For example, to say
that a table is going to show a minimum of two columns no matter what,
but that if there's room it'll show three or whatever.  For most widgets
this wouldn't matter (just put it in a scrolled Pane and forget about
it) but Tk::Table works differently...it only shows entire widgets and
scrolls by widget width or height.  The number of rows or columns can be
specified but then it only displays that many, no matter how much extra
space might be available because the user resized the window or another
widget made it bigger.

Actually, let me rephrase that.  I'm pretty sure it isn't possible when
using an existing widget.  But how would you encode that in a widget?  
Is it possible to find out how big its parent wants to be, or is this
too difficult because the size of the parent depends on the size of the
widgets within it?

Where should I go looking for this information?  I have the _Learning
Perl/Tk_ but it's less than forthcoming about how to create a widget or
how to handle matters like this.
--
Kevin Michael Vail | a billion stars go spinning through the night,

. . . . . . . . .  | But _in_ you is the presence that
 . . . . . . . . . | will be, when all the stars are dead.  (Rainer Maria Rilke)



Thu, 26 Jun 2003 10:04:51 GMT  
 General widget sizing question
[Apologies to those seeing this twice...Marc Dashevsky suggested I send
this to the ptk mailing list.]

Is it possible when using something like a Tk::Table to have its size
depend on the size of the widget it's packed into?  For example, to say
that a table is going to show a minimum of two columns no matter what,
but that if there's room it'll show three or whatever.  For most widgets
this wouldn't matter (just put it in a scrolled Pane and forget about
it) but Tk::Table works differently...it only shows entire widgets and
scrolls by widget width or height.  The number of rows or columns can be
specified but then it only displays that many, no matter how much extra
space might be available because the user resized the window or another
widget made it bigger.

Actually, let me rephrase that.  I'm pretty sure it isn't possible when
using an existing widget.  But how would you encode that in a widget?  
Is it possible to find out how big its parent wants to be, or is this
too difficult because the size of the parent depends on the size of the
widgets within it?

Where should I go looking for this information?  I have the _Learning
Perl/Tk_ but it's less than forthcoming about how to create a widget or
how to handle matters like this.

Kevin Michael Vail | a billion stars go spinning through the night,

. . . . . . . . .  | But _in_ you is the presence that
 . . . . . . . . . | will be, when all the stars are dead.  (Rainer Maria Rilke)
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the



Fri, 27 Jun 2003 09:03:27 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Graph widgets in general (was Re: BLT Graph Widget)

2. Frequently Asked Questions Part 2 - General Questions

3. Frequently Asked Questions Part 1 - General Questions

4. CGI.pm Bug: file upload file size mismatch when file size is close to buffer size

5. Extracting font size ONLY from text widget with -cget

6. How to get real size of expanded widget?

7. Extracting the Text widget current size

8. Getting size of Tk Text widget

9. How do I set widget/window size (-geometry does not work)

10. size of widgets

11. fixed size for Entry widget?

12. Tree Widget actual size

 

 
Powered by phpBB® Forum Software