Justifiy text 
Author Message
 Justifiy text

Hi,

I was wondering whether it is possible to justify text so that the left
text margin is at the left window side and the right text margin is at
the right window side (like the HTML attribute align="justify" would do
it). There does not seem to be an option for this in any widget so I
assume it must be done with a hack/user created widget. Google did not
produce any appropriate hits on 'perl tk justify'.

Any hints?

Thanks in advance,
        Holger



Sun, 27 Mar 2005 23:56:05 GMT  
 Justifiy text

Quote:
> Hi,

> I was wondering whether it is possible to justify text so that the left
> text margin is at the left window side and the right text margin is at
> the right window side (like the HTML attribute align="justify" would do
> it). There does not seem to be an option for this in any widget so I
> assume it must be done with a hack/user created widget. Google did not
> produce any appropriate hits on 'perl tk justify'.

> Any hints?

I don't think this is easily doable with the existing text widget. You
can try some hacks by putting one-pixel images to enlarge horizontal
spacing between words, but this will be hard in a Text widget (it
should be easier in a ROText).

Maybe there's already a solution in Tcl/Tk?

Regards,
        Slaven

--

Tk-AppMaster: a perl/Tk module launcher designed for handhelds
        http://tk-appmaster.sf.net



Mon, 28 Mar 2005 04:03:31 GMT  
 Justifiy text

Quote:
> Hi,

> I was wondering whether it is possible to justify text so that the left
> text margin is at the left window side and the right text margin is at
> the right window side (like the HTML attribute align="justify" would do
> it). There does not seem to be an option for this in any widget so I
> assume it must be done with a hack/user created widget. Google did not
> produce any appropriate hits on 'perl tk justify'.

> Any hints?

There's a canvas based solution for Tcl/Tk in http://mini.net/tcl/3819
My tcl2perl translator is not yet finished, so you have to do the
translation yourself :-)

Regards,
        Slaven

--

    BBBike - route planner for cyclists in Berlin
    WWW version:     http://www.bbbike.de
    Perl/Tk version: http://bbbike.sourceforge.net



Mon, 28 Mar 2005 04:38:32 GMT  
 Justifiy text

Quote:

> There's a canvas based solution for Tcl/Tk in http://mini.net/tcl/3819
> My tcl2perl translator is not yet finished, so you have to do the
> translation yourself :-)

My tcl2perl xlator is old, but still does a good job, although the fingers
miss a step here and there.


Mon, 28 Mar 2005 06:12:46 GMT  
 Justifiy text

Quote:

> > There's a canvas based solution for Tcl/Tk in http://mini.net/tcl/3819
> > My tcl2perl translator is not yet finished, so you have to do the
> > translation yourself :-)

> My tcl2perl xlator is old, but still does a good job, although the fingers
> miss a step here and there.

The one included with the Perl/Tk source? I had not much success with
that one, so I decided to start writing one from the scratch using
Parse::RecDescent.

Regards,
        Slaven

--

Lost in your Tk widget tree? Try
        http://user.cs.tu-berlin.de/~eserte/src/perl/Tk-WidgetDump/



Mon, 28 Mar 2005 07:21:53 GMT  
 Justifiy text

Quote:



>> > There's a canvas based solution for Tcl/Tk in http://mini.net/tcl/3819
>> > My tcl2perl translator is not yet finished, so you have to do the
>> > translation yourself :-)

>> My tcl2perl xlator is old, but still does a good job, although the fingers
>> miss a step here and there.
> The one included with the Perl/Tk source? I had not much success with
> that one, so I decided to start writing one from the scratch using
> Parse::RecDescent.

Oh, Nick's? No, my noggin (; I will admit that manual conversion
becomes tedious very rapidly - I'd be glad to test your translator
when ready.  IIRC, Nick uses(d) Tcl-pTk to do the initial mass
conversion of a Tcl/Tk release.

Steve



Mon, 28 Mar 2005 19:07:54 GMT  
 Justifiy text

Quote:



> >> > There's a canvas based solution for Tcl/Tk in http://mini.net/tcl/3819
> >> > My tcl2perl translator is not yet finished, so you have to do the
> >> > translation yourself :-)

> >> My tcl2perl xlator is old, but still does a good job, although the fingers
> >> miss a step here and there.

> > The one included with the Perl/Tk source? I had not much success with
> > that one, so I decided to start writing one from the scratch using
> > Parse::RecDescent.

> Oh, Nick's? No, my noggin (; I will admit that manual conversion
> becomes tedious very rapidly - I'd be glad to test your translator
> when ready.  IIRC, Nick uses(d) Tcl-pTk to do the initial mass
> conversion of a Tcl/Tk release.

There is Tcl-pTk (in the pTk directory) which is used to do conversion
of the Tk C files. And there's tcl2perl in the top source directory
(yours?).

Regards,
        Slaven

--

Start a WWW browser - OS independent:
        http://user.cs.tu-berlin.de/~eserte/src/perl/WWWBrowser/



Mon, 28 Mar 2005 22:52:41 GMT  
 Justifiy text

Quote:





>> >> > There's a canvas based solution for Tcl/Tk in http://mini.net/tcl/3819
>> >> > My tcl2perl translator is not yet finished, so you have to do the
>> >> > translation yourself :-)

>> >> My tcl2perl xlator is old, but still does a good job, although the fingers
>> >> miss a step here and there.

>> > The one included with the Perl/Tk source? I had not much success with
>> > that one, so I decided to start writing one from the scratch using
>> > Parse::RecDescent.

>> Oh, Nick's? No, my noggin (; I will admit that manual conversion
>> becomes tedious very rapidly - I'd be glad to test your translator
>> when ready.  IIRC, Nick uses(d) Tcl-pTk to do the initial mass
>> conversion of a Tcl/Tk release.
> There is Tcl-pTk (in the pTk directory) which is used to do conversion
> of the Tk C files.

Correct, my mistake.

 And there's tcl2perl in the top source directory

Quote:
> (yours?).

No, Nick's, that was what I was thinking of...


Mon, 28 Mar 2005 23:31:42 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. RFD: Text::FormWrap, a Text::Wrap replacement

2. running perl at command line with arguments: script.cgi?text=text

3. Thoughts on Text::Wrap, and perhaps a Text::Justify

4. ANNOUNCE: Text::Vpp 0.01 Versatile text pre-processor

5. Text::Reform 1.06 formatting text incorrectly

6. Please help me how is easiest way to extract text between some variable text

7. Text::ParseWords or Text::CSV

8. Inserting text top of plain/text MIME section

9. remove text from text file

10. scroll text on text-modal console?

11. How to replace text in a text file.

12. cr's in input text fields screwing up the database (not text area)

 

 
Powered by phpBB® Forum Software