OK, didn't try hard enough!
Paint.Font.RichTextWidth(TextString) should do the trick.
--
View this message in context:
http://old.nabble.com/Gambas3-Printing---text-width-tp32991752p32992108.html
Sent from the gambas-user mailing list archive at Nabble.com.
---
2011/12/17 Bill-Lancaster :
>
> I'm using
>
> Paint.DrawRichText(MoneyValue, x, y)
>
> and want to have money values right justified (ideally '.' justified).
>
> The Align.Right option doesn't help.
yes you need to specify right relative to ???
you need to specify the width and height o
I'm using
Paint.DrawRichText(MoneyValue, x, y)
and want to have money values right justified (ideally '.' justified).
The Align.Right option doesn't help.
Any ideas?
Gambas 2.99.6, qt4
--
View this message in context:
http://old.nabble.com/Gambas3-Printing---text-width-tp3299175
Benoit,
Have you managed to look at the GTK+ printer dialog problems?
With further testing I set the orientation to "Landscape" in code and
the paper was correctly oriented. IE The long edge was horizontal but
the Paint.Width and Paint.Height did not change so the printing was
truncated in width
>
> And there is another bug in gb.qt4 printing: the font size is not
> resolution independant, whereas it should be the contrary according the
> documentation (i.e. a 50 points font is very small, as if its height is
> actually 50 pixels.). I must investigate too...
>
The font size bug when pri
> Hi Fabien,
> I've got printing to work ok but positioning objects on the page is
> difficult compared to Gambas2. The Paint.Width and Paint.Height values
> seem to bear no relation to pixels or mm. On A4 paper I get values of
> 559 and 760 approx. What units are used here? (My printer resolution
Hi Fabien,
I've got printing to work ok but positioning objects on the page is
difficult compared to Gambas2. The Paint.Width and Paint.Height values
seem to bear no relation to pixels or mm. On A4 paper I get values of
559 and 760 approx. What units are used here? (My printer resolution is 300)
Thanks Fabien,
I am getting there slowly. Can print in a small test app but in a real
world app I just get blank pages. One of the problems I overcame was the
different units used by the printer and Paint routines. In Gambas2 the
printer and Draw objects both used pixels. Now we seem to have a m
Private hPrint As New Printer As "Printer"
Public Sub Form_Open()
If Not hPrint.Configure() Then
hPrint.Print
Endif
End
Public Sub Printer_Begin()
hPrint.Count = 1
End
Public Sub Printer_Draw()
Paint.Font.Size = 12
Paint.Text("Hello", 30, 50)
Paint.fill
End
Public Sub Pri
Does anybody have any experience of printing with Gambas3?
My sample code is below and the result is:
Calling .Configure fires the _End event.
Then the _Begin, _Paginate and _Draw events all fire.
Then I get an error "(Test:4193): Gtk-CRITICAL **:
IA__gtk_print_context_get_cairo_context: assertion
10 matches
Mail list logo