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

message box text
Is there any way to centre multi-line text in  a tk_messageBox other than by
judicious padding with spaces?

Ian

Report this thread to moderator Post Follow-up to this message
Old Post
Ian Bell
04-27-05 01:58 AM


Re: message box text
On Tue, 26 Apr 2005, Ian Bell wrote:

> Is there any way to centre multi-line text in a tk_messageBox other than
> by judicious padding with spaces?

Doesn't seem to be, tk_messageBox is a blocking procedure, so one has to
forget about
.__tk__messagebox.msg -justify center
afterwards.
But all is not lost, yet. We can use option database for this. Messagebox
is of class Dialog, so
option add *Dialog.msg.justify center
should do the trick. Alas, it doesn't, msgbox.tcl hardwires justify. So it
is up to you to grab lib/tk8.?/msgbox.tcl and do the magic. Here is diff
for 8.5a2 msgbox.tcl:

293c293,294
<     label $w.msg -anchor nw -justify left -text $data(-message) \
---
>     option add *Dialog.msg.justify left widgetDefault
>     label $w.msg -anchor nw -text $data(-message) \

Now Dialog.msg respects justify, and you can adjust justifying.

Bad things probably happen with this, as I guess *Dialog.msg isn't just
tk_messageBox... But hey, I've never used option database so far, so this
is just a sketch for someone else to fill up :)

--
-Kaitzschu
s="TCL ";while true;do echo -en "\r$s";s=${s:1:${#s}}${s:0:1};sleep .1;done

Report this thread to moderator Post Follow-up to this message
Old Post
Kaitzschu
04-27-05 09:00 PM


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 07:35 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.