On Jan 7, 2007, at 9:33 AM, Bart Pietercil wrote:

Hi List,

passing sunday breaking my head on this simple thing.

Why does this code not draw a string in the new canvas ?

Sub Action()
  Dim aCanvas As Canvas

  aCanvas = new Canvas1

  aCanvas.Top = 120

  aCanvas.Graphics.DrawString("allo,allo",0,0,50)
End Sub

I have put a graphic inside the template canvas and I see it is created after performing the action. ( I see 2 images in the window)

But why the last line doesn't do a thing beats me....

Help REALLY appreciated


Using a y-coordinate of 0 specifies the base(bottom) of the string at 0, thus the string text is off(above), the canvas. Try a larger y- coordinate, at least aCanvas.Graphics.DrawString("allo, allo", 0, aCanvas.Graphics.TextHeight, 50). Also, put code in the Paint event to maintain your image.

Best,

Jack
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to