reaper9187 has asked for the wisdom of the Perl Monks concerning the following question:
Hi everyone ,
I urgently require some suggestions regarding formatting of text in perl tk's text widget. Can we create a table within the tk widget to display data ..???? I know this may sound silly but my actual problem is displaying text in the widget in a very organized manner.
My problem can be broadly viewed as :
1. Display text in a table format ( multiple rows, 4 columns ). I use the command $txt->insert('end', "ABC\t\tBCN\t\tNN\t\tARCFN\n"); However, the major limitation for this format is the string size. As soon as the string length for for any of the first three strings exceeds a certain length, the tab spacing is increased making the entry look weird. Is there a better way to do this ??? Thanks ..
I want to have something like :
ABC   NACA   AFASFA  AAA
ABC   NACA   AFASFA   AAA
As soon as the string size increases, the pattern looks something like this
ABC   NACA   AFASFA   AAA
ABCASDA     NACA     AFASFA     AAA
AS   NACA   AFASFA   AAA
Please help ,...1!!
I urgently require some suggestions regarding formatting of text in perl tk's text widget. Can we create a table within the tk widget to display data ..???? I know this may sound silly but my actual problem is displaying text in the widget in a very organized manner.
My problem can be broadly viewed as :
1. Display text in a table format ( multiple rows, 4 columns ). I use the command $txt->insert('end', "ABC\t\tBCN\t\tNN\t\tARCFN\n"); However, the major limitation for this format is the string size. As soon as the string length for for any of the first three strings exceeds a certain length, the tab spacing is increased making the entry look weird. Is there a better way to do this ??? Thanks ..
I want to have something like :
ABC   NACA   AFASFA  AAA
ABC   NACA   AFASFA   AAA
As soon as the string size increases, the pattern looks something like this
ABC   NACA   AFASFA   AAA
ABCASDA     NACA     AFASFA     AAA
AS   NACA   AFASFA   AAA
Please help ,...1!!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Formatting text-Create table -perl Tk
by toolic (Bishop) on Dec 03, 2012 at 20:16 UTC | |
Re: Formatting text-Create table -perl Tk
by kcott (Archbishop) on Dec 04, 2012 at 08:42 UTC | |
Re: Formatting text-Create table -perl Tk
by zentara (Archbishop) on Dec 04, 2012 at 10:40 UTC | |
Re: Formatting text-Create table -perl Tk
by reaper9187 (Scribe) on Dec 05, 2012 at 19:10 UTC | |
by brap (Pilgrim) on Dec 05, 2012 at 19:35 UTC | |
by reaper9187 (Scribe) on Dec 05, 2012 at 21:36 UTC | |
Re: Formatting text-Create table -perl Tk
by reaper9187 (Scribe) on Dec 05, 2012 at 18:14 UTC | |
by brap (Pilgrim) on Dec 05, 2012 at 18:56 UTC |
Back to
Seekers of Perl Wisdom