Home » U++ Library support » RichText,QTF,RTF... » QTF text alignment in tables
|
Re: QTF text alignment in tables [message #26784 is a reply to message #26783] |
Thu, 27 May 2010 14:07 |
|
kropniczki wrote on Thu, 27 May 2010 13:42 | Is it possible to right-align text inside a table cell?
I´ve tried {{1:1 left-aligned ::> right-aligned }} and {{1:1 left-aligned :: [> right-aligned] }}, but both failed.
Thanks!
|
Hi kropniczki,
This should work: {{1:1:1 [< left aligned]:: [= center aligned]:: [> right aligned]}}
Litlle hint: If you want to use some complex QTF, you can try to design it in T++ (or in UWord) and read the .tpp (or .qtf) file in plain text editor to get the idea
Best regards,
Honza
|
|
|
Re: QTF text alignment in tables [message #26790 is a reply to message #26784] |
Fri, 28 May 2010 13:02 |
|
bushman
Messages: 134 Registered: February 2009
|
Experienced Member |
|
|
Yes, thank u so much for the prompt answer!
Although it does work wonderfully when I´m using UWord, it fails if I try to output the formatted text to a printer, like in
String qtf;
qtf = "{{5000:5000 [s0;>%% right-align] :: [s0;%% whatever]}}";
Report report;
report << qtf;
Perform(report);
Anyway, it simply does NOT right-align the text. Could it be, dare to say, due to some bug? What am I doing wrong?
Thanks again!
[Updated on: Fri, 28 May 2010 13:11] Report message to a moderator
|
|
|
Re: QTF text alignment in tables [message #26791 is a reply to message #26790] |
Fri, 28 May 2010 13:40 |
|
kropniczki wrote on Fri, 28 May 2010 13:02 | Yes, thank u so much for the prompt answer!
Although it does work wonderfully when I´m using UWord, it fails if I try to output the formatted text to a printer, like in
String qtf;
qtf = "{{5000:5000 [s0;>%% right-align] :: [s0;%% whatever]}}";
Report report;
report << qtf;
Perform(report);
Anyway, it simply does NOT right-align the text. Could it be, dare to say, due to some bug? What am I doing wrong?
Thanks again!
|
Hi,
I tested it just simply using PromptOK("qtf text..."). If it works on screen and fails on printer, than it is most probably a bug.
I'm afraid I can't help on this one Hopefully someone else will have a look at it...
Honza
|
|
|
|
|
Re: QTF text alignment in tables [message #28212 is a reply to message #26803] |
Mon, 23 August 2010 14:10 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
BTW, I've got an handy QTFStr class which encapsulates some of QTF behaviour, in particular for tables.
I made it because is *very* easy on qtf to make mistakes with some spaces or other stuffs, in particular in tables.
The class contains some generic stuffs and a part relative to my app, but that one is easy to strip.
An example of code using QTFStr class :
QTFStr qtf;
qtf.StartTable(1, 5, 5, 7, 8).TableTitle("I'm a table");
qtf
("")("second col")("third col")("fourth col")("fifth col")
("first col").AlignCenter()("center on table remainder", 3)
.AlignLeft().TableSubTitle("this is bold and spans over all columns")
;
qtf.EndTable();
It doesn't support tables in tables, but it's trivial to add (I'll do it when I'll need it).
If somebody is interested on it, I'll be happy to post the code somewhere.
Ciao
Max
|
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Apr 26 10:45:16 CEST 2024
Total time taken to generate the page: 0.03493 seconds
|