Re: [Gambas-user] Menu over a control

2011-06-29 Thread M. Cs.
Still I have a problem: If I create TextLabels as you told me, I can get their tags, so I can identify them, but cannot remove them. In other case if I create them as a TextLabel[], I can add and remove them, but cannot figure which one of them has been clicked. How to make both of the option

Re: [Gambas-user] Menu over a control

2011-06-29 Thread M. Cs.
Thaa,...I've managed to solve this problem, but ran into another: Menus. Once I had simply to create menu with: mymenu=New Menu(FMain) mysub1=New Menu(mymenu) mysub1.Text=Item1 mysub1.Action=Action1 mymenu.popup() And it worked like a charm. Now in G3 it says after the popup there's no return

Re: [Gambas-user] Menu over a control

2011-06-29 Thread tobias
hi, If I create TextLabels as you told me, I can get their tags, so I can identify them, but cannot remove them. oh, of course, you can: LAST.Delete() if I create them as a TextLabel[], I can add and remove them, but cannot figure which one of them has been clicked. How to make both of the

Re: [Gambas-user] Menu over a control

2011-06-29 Thread Rolf-Werner Eilert
Yes, that would be a problem, but there is LAST to handle this: LAST.Tag would give you the tag of the object which was clicked last. You will identify the correct type of object by its name of origin MyText. Now you can insert Public SUB MyText_Click() When you type LAST. you will get the

Re: [Gambas-user] Menu over a control

2011-06-29 Thread M. Cs.
Can you give me a menu example for Gambas3, since the Gambas2 way of doing it doesn't work? Thanks 2011/6/29, Rolf-Werner Eilert eilert-sprac...@t-online.de: Yes, that would be a problem, but there is LAST to handle this: LAST.Tag would give you the tag of the object which was clicked last.

Re: [Gambas-user] Menu over a control

2011-06-29 Thread Rolf-Werner Eilert
Due to technical reasons, I have not worked with Gambas3 yet. So I cannot give you a Gambas3 real life example. But I will read the answers of the other guys here to (hopefully) keep in mind once I'll start with it :-) Rolf Am 29.06.2011 10:27, schrieb M. Cs.: Can you give me a menu example

Re: [Gambas-user] Menu over a control

2011-06-29 Thread tobias
hi, i just installed kubuntu 11.04 yesterday, i couldn't compile gambas3 with my old ubuntu... i hope, i can figure it out at home, if your questions isn't answered then :) -- All of the data generated in your IT

Re: [Gambas-user] Menu over a control

2011-06-29 Thread M. Cs.
OK. I found that I have to put PUBLIC SUB Action_Activate(key as string) AS Boolean in order to get dinamical menus to work. The As Boolean wasn't present in G2. 2011/6/29, tobias tobiasb...@web.de: hi, i just installed kubuntu 11.04 yesterday, i couldn't compile gambas3 with my old ubuntu...

[Gambas-user] Menu over a control

2011-06-28 Thread M. Cs.
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

Re: [Gambas-user] Menu over a control

2011-06-28 Thread Fabien Bodard
Public sub _New() dim i as integer dim hTextLabel as TextLabel For i = 0 to 100 hTextLabel = new TextLabel(Me) as MyText hTextLabel.Tag = i next end Public Sub MyText_Click() select case Last.Tag Case 1 'Text1 Case 2 'Text2 'etc end end 2011/6/28 M. Cs.

Re: [Gambas-user] Menu over a control

2011-06-28 Thread M. Cs.
Merci Fabien! 2011/6/28, Fabien Bodard gambas...@gmail.com: Public sub _New() dim i as integer dim hTextLabel as TextLabel For i = 0 to 100 hTextLabel = new TextLabel(Me) as MyText hTextLabel.Tag = i next end Public Sub MyText_Click() select case Last.Tag Case 1