[Gambas-user] Q: draw to screen.

Rohnny Stormo rohnny at ...1248...
Wed Jan 25 20:39:31 CET 2006


My Question is, how to draw text to screen using draw command.

I have a printing class, shortet in like this.

PUBLIC FUNCTION Print(txt as string , prn AS Object) AS Boolean
  draw.Begin(prn)
  draw.Font.Name = "Courier"
  draw.Font.Size = 16
  draw.Font.Bold = TRUE
  draw.Text(txt, 300, 300)
  Finally
      draw.End
      RETURN TRUE
  CATCH
    'Some error with the printer
     RETURN FALSE
end function


In main program I use it like this.
Dim p as new printclass

p.Print("My Text",Printer)

That works like a sharm.

Now to my problem. How to output this to a form or a picturebox or a 
scrollview.
My thinking is to use the same routine only change the prn to ex. 
PictureBox1 but that
does not work.

An example would be nice.


-- 
-----------------------------------------
Gambas brings Basic to Linux.
My Gambas Community http://forum.stormweb.no





More information about the User mailing list