[Gambas-user] Which container to use for Draw Image?

Алексей Беспалов bespalov.av at ...626...
Wed Jan 18 15:52:32 CET 2012


Hi!
Please help me.


Which container to use for Draw Image?
So you can determine which of Image Clicked.

I used to DrawArea at HPanel. But I do not know how to identify the object in
the event DrawArea Click ().

This is part my code:

--------------------------------------------------
Public Sub DrawImages(mhImage As Image[], Parent As Container, SizeArea As
Integer)
Dim hImage As Image
Dim hArea As DrawingArea

MVars.mAreas.Clear()
Parent.Children.Clear()

  For Each hImage In mhImage
    hArea = New DrawingArea(Parent)
    Object.Attach(hArea, FMain, "hArea")
    MVars.mAreas.Add(hArea)

    hArea.Cached = True
    hArea.Border = 2

    DrawImage(hImage, hArea, SizeArea) 'Draw Image on hArea
    Next
End
----------------------------------------------------

In FMain code:

----------------------------------------------------
Public Sub hArea_DblClick()
    Message.Info("!!!")
End
----------------------------------------------------
It is work. But can i determine which of Image i Clicked??

-- 
____
С уважением Алексей.



More information about the User mailing list