summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/bgerror.tcl18
1 files changed, 12 insertions, 6 deletions
diff --git a/library/bgerror.tcl b/library/bgerror.tcl
index d9770ae..b53f37b 100644
--- a/library/bgerror.tcl
+++ b/library/bgerror.tcl
@@ -9,8 +9,8 @@
# Copyright (c) 1998-2000 by Ajuba Solutions.
# All rights reserved.
#
-# RCS: @(#) $Id: bgerror.tcl,v 1.21 2002/06/09 09:07:14 mdejong Exp $
-# $Id: bgerror.tcl,v 1.21 2002/06/09 09:07:14 mdejong Exp $
+# RCS: @(#) $Id: bgerror.tcl,v 1.22 2002/07/04 09:25:45 dkf Exp $
+# $Id: bgerror.tcl,v 1.22 2002/07/04 09:25:45 dkf Exp $
namespace eval ::tk {
namespace eval dialog {
@@ -174,7 +174,13 @@ proc ::tk::dialog::error::bgerror err {
# 2. Fill the top part with bitmap and message
- label .bgerrorDialog.msg -justify left -text $text -font $messageFont
+ # Max-width of message is the width of the screen...
+ set wrapwidth [winfo screenwidth .bgerrorDialog]
+ # ...minus the width of the icon, padding and a fudge factor for
+ # the window manager decorations and aesthetics.
+ set wrapwidth [expr {$wrapwidth-60-[winfo pixels .bgerrorDialog 9m]}]
+ label .bgerrorDialog.msg -justify left -text $text -font $messageFont \
+ -wraplength $wrapwidth
if { $tcl_platform(platform) eq "macintosh" } {
# On the Macintosh, use the stop bitmap
label .bgerrorDialog.bitmap -bitmap stop
@@ -190,9 +196,9 @@ proc ::tk::dialog::error::bgerror err {
-row 0 \
-padx 3m \
-pady 3m
- grid configure .bgerrorDialog.msg -sticky nsw
- grid rowconfigure .bgerrorDialog.top 1 -weight 1
- grid columnconfigure .bgerrorDialog.top 1 -weight 1
+ grid configure .bgerrorDialog.msg -sticky nsw -padx {0 3m}
+ grid rowconfigure .bgerrorDialog.top 1 -weight 1
+ grid columnconfigure .bgerrorDialog.top 1 -weight 1
# 3. Create a row of buttons at the bottom of the dialog.