Making tktreectrl `just big enough'
- From: dwtowner@xxxxxxxxxxxxxx
- Date: Tue, 29 Jul 2008 07:07:21 -0700 (PDT)
Hi all,
I would like to create a tktreectrl which requests only just enough
space to display its contents, but I can't figure out how to do this.
I am mainly interested in setting the height appropriately, rather
than the width.
The -height option has a `0 or negative' value option which I though
might work, but it doesn't. I then tried using the bbox command to
retrieve the actual height of the table, and plug that back in to the -
height config option, but bbox seems to return values which are too
big - the height is always about 1 row too big, leaving an empty gap
at the bottom of the table. The only way I have found that works so
far is to compute the height of an individual row (using item bbox),
multiplying that by the number of visible rows, and then setting the -
height from that.
Surely there must be an easier way. Am I missing something?
I am using tktreectrl 2.2.3 and Tk 8.5.0.
thanks,
dan.
.
- Follow-Ups:
- Re: Making tktreectrl `just big enough'
- From: Tim Baker
- Re: Making tktreectrl `just big enough'
- Prev by Date: Re: Tk8.5: text-widget yview command gives wrong information
- Next by Date: [tDOM] Writing parsed xml document back to a file
- Previous by thread: Re: expect match fancy prompt
- Next by thread: Re: Making tktreectrl `just big enough'
- Index(es):
Relevant Pages
|