[Gambas-user] Print probleem with pictures/text

Timothy Marshal-Nichols timothy.marshal-nichols at ...247...
Mon Jul 24 11:48:40 CEST 2006


This project is version of previous one:

It includes the bug fix for the first printing example
And a second example that includes a crude word wrap function

Note that for the Word-Wrap function to work you must have set up your
Draw.Begin(Printer) call and also set the Font you want.

Thanks

8-{)} Timothy Marshal-Nichols
<mailto: timothy.marshal-nichols at ...247...>


> -----Original Message-----
> From: gambas-user-bounces at lists.sourceforge.net
> [mailto:gambas-user-bounces at lists.sourceforge.net]On Behalf Of Ron
> Onstenk
> Sent: Saturday, 22 July 2006 22:54
> To: mailing list for gambas users
> Subject: Re: [Gambas-user] Print probleem with pictures/text
>
>
> On Friday 21 July 2006 08:22, Timothy Marshal-Nichols wrote:
> > *** Timothy: The text is taken from a TextArea and should be
> multi line in
> > the print out. The Align options like Center do work.
> >
> > What I think you want is a 'WordWrap' option. This is not
> supported by the
> > Draw.Text() method. But it should be possible to use
> Draw.TextWidth(txt) to
> > create a usable version of WordWrap. Evan if it is not perfect.
> > ***
>
> You are correct with 'WordWrap'.
> In the screen shot the cyan is the size and the text is not wrapped :(
>
> Using next code part:
>  bigText = file.Load("garantie.text")
>  draw.BackColor = color.Red
>  draw.FillColor = color.Green
>  draw.ForeColor = color.Yellow
>  draw.Transparent = FALSE
>  draw.FillColor = color.Cyan
>  draw.FillStyle = fill.Solid
>
>  ' Draw.Text(bigText, 100, (Printer.Height / 2) + 100 +
> (Printer.Height / 4), Printer.Width - 200,
> Draw.TextHeight(bigText), Align.left)
>  ' Draw.Rect(100, (Printer.Height / 2) + 100 + (Printer.Height /
> 4), Printer.Width - 200, Draw.TextHeight(bigText))
>   Draw.Rect(100, (Printer.Height / 2) + 100 + (Printer.Height /
> 4), 1000, Draw.TextHeight(bigText))
>   Draw.Text(bigText, 100, (Printer.Height / 2) + 100 +
> (Printer.Height / 4), 1000, Draw.TextHeight(bigText), Align.left)
>
> I'll try to make a function for wordwrap or the bigtext must
> provide the correct width.
>
> Anyway I should be able to more now after all the struggle.
>
> Thanks again
>
> Ron
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PrintTwoImagesV0.0.2.tar
Type: application/x-tar
Size: 40960 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20060724/8b1bd29f/attachment.tar>


More information about the User mailing list