Text Fields Dont align

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

wee wullie
Posts: 78
Joined: Fri Oct 03, 2008 10:13 am

sorry for not explaining things properly

Post by wee wullie » Fri Nov 07, 2008 1:37 am

Hi Mark, (apologies for taking so long to reply, just got back from work)
The test stack that you told me to build works and prints fine with no problems, as does the sample stack that Jan kindly sent me (Thank You Jan), they both print out exactly as on the screen.

My app has one main stack with two printable cards, the main stack contains 15 text fields, 13 combo boxes, 1 list field and labels for describing each of these plus a few more labels, the user fills in all the fields, makes selections from the combo boxes etc, certain bits of this data is then put into both of the printable cards (one is a certificate and one is a report), and the user can then preview either of the printable cards prior to printing, both cards are printing to a4 or as close to it as i can get (full a4 page exept for about a centimetre at the bottom), only part of the card is printed as you can probably tell by the button code i posted earlier, the certificate page or card contains a fancy border all round the page and two more images, some of the fields need to be centred as they contain text of varying lengths (from about 4-5 chars up to 20-ish chars), and as its a certificate, it needs to be aligned correctly or it just looks naff, the fields dont centre on the page and the text inside the fields behaves as if it is much longer than it is and even if i spend a bit of time adjusting them, when i print, the fields are well out of alignment,
It worked and looked fine when i was using rev 2.7.4, when i installed rev 2.9 i started getting these problems with my stack although to be fair, it is probably something that i've done along the way.

Willie.

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Fri Nov 07, 2008 7:14 am

Could you verify that the 'formatForPrinting' property of your printing stacks is set to "true" - you've probably done this but make sure.

Also I recall a recent thread where someone was having problems with styles in small font sizes (I think it was 8 points text) - or is it even at large sizes for you?

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Fri Nov 07, 2008 10:17 am

[ even if i spend a bit of time adjusting them, when i print, the fields are well out of alignment, ]

What exactly do you do, adjusting them?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

wee wullie
Posts: 78
Joined: Fri Oct 03, 2008 10:13 am

format for printing

Post by wee wullie » Fri Nov 07, 2008 10:27 am

Hi Jan,
The format for printing is set to true , the text size of most of the fields are 9 pts (thats the smallest size available to me, 8 pts would have been better but rev only lets me go down to 9 pts), three fields are 12 pts,
So yes, i am using small font sizes,
it may be worth mentioning that two of the fields contain multiple fields i.e.

Code: Select all

put selectedtext of button "title" card 1 && fld "firstname" card 1 && fld "lastname" card 1 into fld "field9"

This problem only happens to some of the fields, it happens to large or small text sizes, in fields such as the one above and in single fields,
When the format for printing box is unchecked, the affected fields shift to the left by about 72 pts, some fields remain unchanged, when the box is checked the affected fields shift back but they are then out of alignment and unchecking the box merely shifts the fields to a new position,
I tried replacing the affected fields with new ones, closing down rev to remove from memory, but these new fields are affected in much the same way.

Willie.

wee wullie
Posts: 78
Joined: Fri Oct 03, 2008 10:13 am

it seems to be working

Post by wee wullie » Sun Nov 09, 2008 11:47 am

Well, first of all, Mark, sorry, i didn't notice your last post,
When i said adjusting them, i meant that i had to manually move the fields back to their original positions as they were out by quite a bit even when i re-checked the format for printing box.

I tried replacing the fields, closing rev to remove from memory and at first it was pretty much the same, but for some strange reason it has started working , the card prints almost as it is on the screen, i've tried using the longest words in the combo boxes and fields and then the shortest words and they all centre pretty well,
There was one change that i made to the print button code, i changed it to:

Code: Select all

 open printing with dialog
set printpapersize to 595,842  
set printmargins to 10,10,10,10
print this cd from 10,10 to 595,842 into 10,10,595,972
close printing
I'm not sure if this fixed it or not, but it now seems to be working as expected and it prints to almost a4,
So, Thank You Mark and Thank You Jan for your excellent help and assistance, it is very much appreciated.

Willie

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sun Nov 09, 2008 12:41 pm

Hi Willie,

Since problems usually don't get fixed by themselves, I wonder whether it is really fixed now and would like to ask one more thing. Are you using the geometry manager?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

wee wullie
Posts: 78
Joined: Fri Oct 03, 2008 10:13 am

No

Post by wee wullie » Sun Nov 09, 2008 3:46 pm

Hi Mark,
I'm not using the geometry manager because my app doesn't minimise, it only has a quit box, i assumed that it was for resizing your layout when minimise, maximise was selected by the user so i've never had to use it.

Willie.

Post Reply