[Gambas-user] Menu over a control

M. Cs. mohareve at ...626...
Tue Jun 28 19:27:09 CEST 2011


How can í create a flying menu over a dinamically created control?
I know how can I do it for static elements, but if I have an array of
let say TextLabels, how can I attach a menu to each of the elements
(in order to get and use X and Y coordinates of the controls) ?

Is It possible to use Object.Attach(Me,container,"ArrayClick("&i&")")?
I know it's a bit Javascriptish, but I don't know how to use one
suboutine for multiple elements.

It would be silly to have 100 predefined TextLabels and 100 subs

PUBLIC SUB TextLabel[1]_Click()
Action_Activate("mymenu")
END

PUBLIC SUB TextLabel[2]_Click()
Action_Activate("mymenu")
END
...


I don't see how can Gambas manage this dinamic contents.




More information about the User mailing list