[Gambas-user] Drawing

javier romero cjro99 at ...67...
Fri Apr 21 15:48:55 CEST 2006


Hi, I'm new in gambas, i need help with this:

I have a this proyect:

' Gambas class file
PUBLIC p1 AS Drawing
PUBLIC pag AS DrawingArea

PUBLIC SUB _new()
    p1 = NEW Drawing
    draw.Begin(p1)
      draw.Text("Hello", 0, 0)
    draw.End

END

PUBLIC SUB Form_Open()

pag = NEW DrawingArea(sv1)
    
  pag.Cached = TRUE
  pag.Clear
  pag.BackColor = color.White
  pag.Width = printer.Width
  pag.Height = printer.Height
  pag.Border = 1
  draw.Begin(pag)
    draw.Drawing(p1, 0, 0)
  draw.End
' This works OK
  pag.Visible = TRUE
 
END

PUBLIC SUB Button1_Click()
    
  draw.Begin(printer)
    draw.drawing(p1,0,0, pag.Width, pag.Height)
  draw.End
' This doesn't works
END

I need print a text in a DrawingArea an then when  push a button this text is printed into the printer.
The first part works OK, I print a text in a Drawing object and then put that in a DrawingArea with the Draw method, but when i do the sane with the printer , it does'nt works, only print an empty page, the text is not printed. 

Please i aprecite someone helps me.
Sorry about my English is so bad
Thanks
Javier Romero

_________________________________________________________________
Descarga gratis la Barra de Herramientas de MSN
http://www.msn.es/usuario/busqueda/barra?XAPID=2031&DI=1055&SU=http%3A//www.hotmail.com&HL=LINKTAG1OPENINGTEXT_MSNBH



More information about the User mailing list