| Description: |
OriginalBugID: 878 Bug
Version: 8.0.3
SubmitDate: '1998-11-25'
LastModified: '2000-04-03'
Severity: MED
Status: Released
Submitter: pat
ChangedBy: hobbs
OS: All Windows
FixedDate: '2000-04-03'
FixedInVersion: 8.3
From: Jeff David <[email protected]>
Try this simple chunk of code in 8.0.3:
set win .w
set x [expr int(.3 * [winfo screenwidth .])]
toplevel $win
text $win.txt -wrap word -yscrollcommand "$win.sb set"
scrollbar $win.sb -orient vert -command "$win.txt yview"
pack $win.txt -side left -fill both -expand true
pack $win.sb -side right -fill y
$win.txt insert 0.0 "This is a test"
# set x [expr int(.3 * [winfo screenwidth .])]
update idle
set x [winfo reqwidth $win]
wm maxsize $win $x [winfo screenheight .]
wm geometry $win "-0+0"
update idletasks
It works as expected. It places a text widget and scrollbar
widget in $win and places it in the upper right corner of the
screen.
Now, uncomment the "wm maxsize..." line. Not only is the window
no longer positioned in the upper right corner of the screen, but
the scrollbar disappears!
I've tested this on both Windows 95 and Win NT 4.0. Same thing.
"wm minsize" seems to work fine. Any known fixes/workarounds?
The geometry management bug was fixed in 8.3, and the reason
that the scrollbar disappears is because we've asked for a
space in the 'pack'ed window that only fits the text widget.
The user should use grid geometry management, or make a smaller
default text box. Really, the user probably wants:
update idle ; set x [winfo reqwidth $win]
-- 04/03/2000 hobbs
|