to fill a canvas

Charles Yeomans yeomans at desuetude.com
Sun May 15 10:59:38 CDT 2005


On May 15, 2005, at 1:32 AM, Jules Jacquot wrote:

>
> Le 14 mai 05 à 18:55, Charles Yeomans a écrit :
>
>>
>> On May 14, 2005, at 12:36 PM, Jules Jacquot wrote:
>>
>>
>>> hi, ruslan
>>>
>>> V4RB_2
>>>
>>> how to fill a canvas with data text ?
>>>
>>> any example ?
>>>
>>
>> In general, you simply use Graphics.DrawString to draw text in a 
>> Canvas.  The text can certainly come from a VCursor.
>
> right.
> I'm sorry seem to be a newbie
> i haven't problem with REaldatabase
> simply i don't know to translate it  in Valentina
> to create what before Graphics.Drawstring ?
>
> here is my code
>
> (window "prevue" with canvas1)
>
> dim BbD(-1),Bb as picture
> dim g as graphics
>
>       g=Prevue.canvas1.Graphics       //        <- exception
>       Bb=NewPicture(580,800,16)
>       g=Bb.Graphics
>
> g.drawstring ...............
>
> write what instead canvas1.graphics ?
>
> Thanks Charles

Probably you should be drawing the text in the Canvas1.Paint event 
handler.

Sub Paint(g as Graphics)

   g.DrawString ...

End Sub

What kind of exception is occurring?


--------------
Charles Yeomans



More information about the Valentina mailing list