| Ticket UUID: | 1192323 | |||
| Title: | panedwindow resize problem with minsize | |||
| Type: | Bug | Version: | obsolete: 8.4.6 | |
| Submitter: | fvogel | Created on: | 2005-04-29 10:47:46 | |
| Subsystem: | 21. [panedwindow] | Assigned To: | hobbs | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2014-02-19 21:42:06 | |
| Resolution: | Fixed | Closed By: | hobbs | |
| Closed on: | 2005-05-31 05:26:12 | |||
| Description: |
The last pane of a panedwindow can get clipped even if -
minsize option is given.
This happens when the toplevel in which the
panedwindow is packed is resized.
Consider the following:
wm resizable . 1 1
wm minsize . 80 260
panedwindow .pw -orient vertical
label .pw.x1 -text Upper -fg orange -bg black
label .pw.x2 -text Lower -fg white -bg red
.pw add .pw.x1 -minsize 150
.pw add .pw.x2 -minsize 100
pack .pw -fill both -expand yes
set compt 0
set initialminheight [lindex [wm minsize .] 1]
bind . <Configure> { \
set sashcoord [.pw sash coord 0];\
set madedown [expr [lindex $sashcoord 1] - 154];\
set newminheight [expr $initialminheight +
$madedown];\
wm minsize . 80 $newminheight; \
incr compt ; \
.pw.x1 configure -text \
"$compt\nwm minsize .: [wm minsize .]\n\
winfo height .:[winfo height .]\n\
.pw.x2 -minsize: [.pw panecget .pw.x2 -minsize]\n\
.pw.x2 -height: [.pw panecget .pw.x2 -height]" ; \
}
Then:
1. Resize the window (increase its height by dragging
down the lower border).
2. Move the sash down as far as possible. -minsize is
used for pane 2, wich is OK
3. Move the sash up as far as possible. -minsize for
pane 1 is OK
4. Resize the window by decreasing its height (drag up
the lower border), until to the wm minsize is hit
5. Move the sash down. And... it moves and reduces
size of pane 2 without to take its minsize into account!!!
This is WRONG behavior.
6. (optional) Now, if you just click on the window border
so that a further Configure event is fired, you can see
the window size increasing (thanks to the binding), and
again taking toplevel minsize into account (but not
panes minsize).
Besides, panecget -height is always empty. Is this
normal?
| |||
| User Comments: |
hobbs added on 2005-05-31 12:26:12:
Logged In: YES user_id=72656 Fixed by patch 1124198 in 8.4.10 and 8.5a3. fvogelnew1 added on 2005-04-30 14:23:14: Logged In: YES user_id=1245417 Thanks for your explanation about -height (so it's only the *initial* height of the pane). Could be added in the man page, btw. Your patch #1124198 works for me with 8.5a3, thanks. I will also try with 8.4.10, but have no time right now. wildcard_25 added on 2005-04-30 07:09:33: Logged In: YES user_id=596509 Have you tried patch #1124198. panecget -height will always be empty because it hasn't been set ie. '.pw add .pw.x2 -minsize 100 -height 150' after it is set it won't change unless you do a paneconfigure to set a new starting height. What you want is [winfo height .pw.x2] fvogelnew1 added on 2005-04-30 04:28:51: Logged In: YES user_id=1245417 Previous tests were on Windows XP SP2. With Mandrake Linux 10.1 using Tcl/Tk 8.4.8, behavior is once again a bit different, but not yet satisfactory. I believe these differences are due to the different tk versions rather than reveal platform discrepancies, since only generic/TkPanedwindow.c should be corrected I think. fvogelnew1 added on 2005-04-30 00:57:23: Logged In: YES user_id=1245417 Just tried the same script with 8.5a3 cvs version of today. Results: 1. panecget -height is still empty - no change 2. The lower pane seems to be no more clipped but I observe that when dragging the sash down with mouse button-2 (step 5 above) the full window increases its size and then reduces it if I move the sash down enough. Therefore some progress should still be made IMHO. fvogelnew1 added on 2005-04-29 17:54:20: Logged In: YES user_id=1245417 Hmm, hope I did not just submit a duplicate of Tk bug 690169, which is still open... Not sure, though. BTW, this is with Tcl/Tk 8.4.6 | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki