thanks ill have a play
however you said
and I'd suggest you play around a bit with gazpacho or glade
which brings me once again full circle. not that i have tried lately but
this is exactly why i wanted to get Glade working in the first place.
and why its still very frustrating that i cant.
Christian Robottom Reis wrote:
On Thu, Jul 15, 2004 at 09:33:46AM +1000, vector180 wrote:
I cant seem to modify the size of a Text entry widget?
Text or Entry?
I only want it to be about 4 characters wide. Setting gtk.Entry(max=4)
dosent effect the size of the box.
That's right. The size of the box is determined by packing: if its
container offers it (or not) the possibility to expand and fill space
available to it in the interface.
This is often confusing, and I'd suggest you play around a bit with
gazpacho or glade to get a feeling for the box model. Basically, the
idea is based on a few key concepts:
- if you have a container with only one child, its child will
take up all its space minus its border:
Border
.----------------------------------/---.
| Window H |
| .----------------------------------. |
| | Entry | |
| '----------------------------------' |
| |
'--------------------------------------
- if you have a container (say a V/HBox) with two (or more)
children, they will fight[*] to determine who takes up more space:
.--------------------------------------.
| Window |
| .-------------. .------------------. |
| | Entry1 | | Entry2 | |
| '-------------' '------------------' |
| |
'--------------------------------------
How much each one wins is determined by:
- the default and requested sizes of the widgets, which normally
depends on things like their contents (for labels, in
particular).
- the expand and fill arguments supplied to add() or
pack_start/end().
Expand means "I will fight for space"
No expand means "I don't care for space"
Fill means "If I got more space, I will occupy it with my
content"
No fill means "If I got more space, leave it blank because I
don't care for it"
This is important to understand when assembling your interfaces, and is
the most peculiar thing about GTK+ programming to a newbie.
Spend some time experimenting with the "packing" tab in gazpacho/glade
and some composite interfaces: it will teach you a lot in very short
time, I suspect.
[*] A cute analogy; in reality expansion, requested sizes, widget
expansion semantics, container semantics, electron spins and lunar
cycles are computed to determine how much space each widget wins. Or
almost that <wink>.
I'm-tired-but-a-bit-bored-too-in-fact-enough-to-do-2am-ascii-art-ly,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3361 2331
--
Urendi Maleldil !.....Mark
[EMAIL PROTECTED]
Mark Symonds
Mechanical Eng
Monash Uni.
Wellington Rd
Clayton 3800 Vic
Australia
Ph BH 9905 3535
Dept Fax 9905 3807
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"I could be bounded in a nutshell and
count myself king of infinite space."
Shakespeare..Hamlet
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/