Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: textedit wordwrap and print wordwrap  (Read 7379 times)
David Z.
Posts: 19


« on: May 03, 2010, 08:16:35 pm »

Is there a way (without a lot of programming) to get a textedit field to wordwrap at the same place when I print? When I print, I can tell it what the right column is. Any way to set the right column in a textedit?

Thanks
.
Four Js
Posts: 115


« Reply #1 on: May 03, 2010, 09:38:13 pm »

In GDC, Textedit wraps at widget boundary, while report wraps at x character.
This has been introduced as TextEdit can resize and it makes more sense to wrap at the widget border than at xx characters and a lots of blank space, or to see half of the text.

If you really need to have the same wrap, you can acheive that respecting following rules:
- use fontpitch=fixed (so TextEdit width will be exactly xx characters) and no stretch
- use no horizontal scrollbar (if any, there is no wordwrap)
- set wrapPolicy attribute to "anywhere", so the wrap will be done exactly at xx characters
- ensure your textedit is exactly the one defined in the .per

For the last point, I would have suggested to use Hbox tags, but it seems there is a conflict between the hbox and the stretchable capacity of the textedit (we're investigating and a Bz is likely to be created).
So I would the suggest :
- either you put your textedit alone in its GRID container
- either to ensure nothing has an effect on your text edit:
for intstance:

Code
  1. 0123456
  2. [c]
  3. [te     ]
  4.  

if c is a label with a long title, this will influence the textedit's width, so you've to avoid this construction.

Following these advices should lead to the same result ; another option is maybe to use a "Traditional" window (in Traditional mode, "fixed font' windows can be mixed with "modern" ones).

This may sound tricky, but built-in report comes from fixed-font age and today the report writer allows you to create much more powerful and fancy reports, therefore we're not focusing on "old" report anymore.
David Z.
Posts: 19


« Reply #2 on: May 03, 2010, 10:20:49 pm »

You gave me the hint I needed!! I had tried most of your suggestions. Putting it in its own grid (with fontpitch=fixed -- which was already done) did the trick.

Thanks
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines