Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

tixPanedWindow problem: Natural size of subwidgets is incorrect
I am having the following problem with tixPanedWindow: For some reason,
I am not able to use multiple frames inside a pane, and have the pane
work with the "correct" natural geometry. I can use one frame with
non-container widgets on it, and that works fine. When I try to add
a second frame, both are displayed, but the natural size is the one
of the first frame. When I put the two frames into one bigger frame,
the natural size seems to become zero. I can use the -size option
to get the correct behaviour, but that doesn't work if I don't
know the correct size of both frames in advance, for example if the
user can change the fonts used in them.

What's the correct way to do this? Or is it a bug in tixPanedWindow?

Below is a stupid example program that demonstrates the problem.
When you run it, the buttons are not visible by default; you
have to enlarge the pane to be able to seem them.

Thanks for any help. If it matters, I am using the Debian itesting packages
tix8.1 (version 8.1.4-6), which in turn uses tcl8.4 (version 8.4.6-1).

- Dirk

------------------------------ snip ------------------------------

set m [frame .main]
set pp [tixPanedWindow $m.p -orientation vertical -dynamicgeometry true]

set p [$pp add top -expand 0]

set f [frame $p.f]
label $f.l -text "Hallo"
grid $f.l
pack $f

set p [$pp add bot -expand 0]

# Uncomment this to put both frames into one big frame
# set p [frame $p.p]
# pack $p -fill both -expand yes

set f [frame $p.f]
label $f.l -text "Links"
label $f.r -text "Rechts"
text $f.t -height 4 -width 20
grid $f.l $f.r -sticky w
grid $f.r -sticky e
grid $f.t - -sticky nswe
grid columnconfigure $f 1 -weight 1
grid rowconfigure $f 1 -weight 1
grid $f -sticky nswe

set f [frame $p.b]
button $f.1 -text "Knopf 1"
button $f.2 -text "Knopf 2"
grid $f.1 $f.2 -sticky we
grid $f -sticky we

$pp add filler  -expand 1

pack $pp -fill both -expand yes

pack $m -fill both -expand yes

Report this thread to moderator Post Follow-up to this message
Old Post
Dirk Thierbach
08-30-04 08:59 PM


Re: tixPanedWindow problem: Natural size of subwidgets is incorrect
Dirk Thierbach wrote:
> I am having the following problem with tixPanedWindow: For some reason,
..
> Thanks for any help. If it matters, I am using the Debian itesting package
s
> tix8.1 (version 8.1.4-6), which in turn uses tcl8.4 (version 8.4.6-1).

If you are using Tcl/Tk 8.4, why don't you use the new core
panedwindow widget in 8.4 instead of the Tix one?

--
Jeff Hobbs, The Tcl Guy
http://www.ActiveState.com/, a division of Sophos

Report this thread to moderator Post Follow-up to this message
Old Post
Jeff Hobbs
08-31-04 01:58 AM


Re: tixPanedWindow problem: Natural size of subwidgets is incorrect
Jeff Hobbs <jeffh@removethis.activestate.com> wrote:

> If you are using Tcl/Tk 8.4, why don't you use the new core
> panedwindow widget in 8.4 instead of the Tix one?

Because I didn't know it was there -- it's been some time since I used
Tcl/Tk last, and Debian just installed the newest package for me.

Thanks, with panedwindow it works. So I guess it's a bug in
tixPanedWindow.

- Dirk


Report this thread to moderator Post Follow-up to this message
Old Post
Dirk Thierbach
08-31-04 08:58 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Tcl archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:59 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.