[Gambas-user] How to create a new drawing area
Fabien Bodard
gambas.fr at ...626...
Tue Feb 2 20:57:18 CET 2010
2010/2/2 Fiddler63 <mx4eva at ...626...>:
>
> I have a button which, when clicked created a new drawing area.
> The following code does that fine (and I can move it with the mouse).
>
> PRIVATE LCD_01 AS NEW Picture
> PRIVATE LCD_02 AS NEW Picture
>
> PUBLIC SUB NewLCD_Btn_Click()
>
> LCD_01 = Picture.Load("Pix_C.png")
> LCD_02 = Picture.Load("Pix_A.png")
> DrawingArea2.X = 500
> DrawingArea2.Y = 300
>
> DrawingArea2.Border = 2
> DrawingArea2.Resize(LCD_01.Width * 10, LCD_01.Height * 2)
> END
>
> PUBLIC SUB DrawingArea2_Draw()
> Draw.Picture(LCD_01, 5, 5)
> Draw.Picture(LCD_02, 43, 5)
> END
>
> PUBLIC SUB DrawingArea2_MouseMove()
> DrawingArea2.X += Mouse.X - Mouse.StartX
> DrawingArea2.Y += Mouse.Y - Mouse.StartY
> END
> '***************************************************
>
> However when I click on the button, I get the same area drawn again
> (actually the already drawn area moves back to the origin x,y co-ordinates)
> I would like to create a new drawing area each time I click the button, i.e.
> if I click the button 10 times, I get 10 new drawing areas.
> Also I would like to be able to delete each drawing area as well.
>
> Any suggestions how I could do this
>
> Ta
> kim
> --
> View this message in context: http://old.nabble.com/How-to-create-a-new-drawing-area-tp27416835p27416835.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
I think itwill be better to draw all thenumbers on the same drawing area..
More information about the User
mailing list