Re: [Gambas-user] dynamic created Menus

2017-02-16 Thread Gianluigi
Hi Tobias, first of all I apologize to you for the late reply. You really been kind and patient to answer in a broad and comprehensive manner to a blockhead like me. I confirm that you are a great and thank you very much. Regards Gianluigi 2017-02-16 0:45 GMT+01:00 Tobias Boege

Re: [Gambas-user] dynamic created Menus

2017-02-15 Thread Gianluigi
Hi Tobias, kindly can you deepen the concept of static. See attached project. Regards Gianluigi 2017-02-15 16:23 GMT+01:00 Gianluigi : > oh I finally understand! > Thanks Tobias, you are a great. > You made me happy :-) > > A big big greeting > Gianluigi > > 2017-02-15

Re: [Gambas-user] dynamic created Menus

2017-02-15 Thread Gianluigi
oh I finally understand! Thanks Tobias, you are a great. You made me happy :-) A big big greeting Gianluigi 2017-02-15 15:38 GMT+01:00 Tobias Boege : > On Wed, 15 Feb 2017, Gianluigi wrote: > > Hi Tobias, > > I thank you a lot for explanations, in fact I was too concise

Re: [Gambas-user] dynamic created Menus

2017-02-15 Thread Tobias Boege
On Wed, 15 Feb 2017, Gianluigi wrote: > Hi Tobias, > I thank you a lot for explanations, in fact I was too concise because, but > not only, of my English. > One thing, when you say: "You can still create objects from a module but > that > isn't useful because you don't have dynamic symbols in a

Re: [Gambas-user] dynamic created Menus

2017-02-15 Thread Gianluigi
Hi Tobias, I thank you a lot for explanations, in fact I was too concise because, but not only, of my English. One thing, when you say: "You can still create objects from a module but that isn't useful because you don't have dynamic symbols in a module", what exactly do you mean by "symbols",

Re: [Gambas-user] dynamic created Menus

2017-02-15 Thread Tobias Boege
On Wed, 15 Feb 2017, Gianluigi wrote: > Hi Fabien, > let's see if I can clarify this. > In Gambas there are three different types of class: > - The real Class and its to be instantiated through the constructor (_new). > - The Form which is a class already instantiated, but can receive the >

Re: [Gambas-user] dynamic created Menus

2017-02-15 Thread Gianluigi
Hi Fabien, let's see if I can clarify this. In Gambas there are three different types of class: - The real Class and its to be instantiated through the constructor (_new). - The Form which is a class already instantiated, but can receive the parameters which exposes the constructor (_new). - The

Re: [Gambas-user] dynamic created Menus

2017-02-14 Thread Gianluigi
But if it is static, because I can write this? Public Sub Form_Open() Dim foo As New MMenu foo.AddMenuFromModule(MenuCharacters) End I have trouble understanding Regards Gianluigi 2017-02-14 18:46 GMT+01:00 Fabien Bodard : > A module is a class but static. Like i

Re: [Gambas-user] dynamic created Menus

2017-02-14 Thread Fabien Bodard
A module is a class but static. Like i you declare all element of a class as static 2017-02-14 17:02 GMT+01:00 Gianluigi : > Hi all, > first let me say that I do not want to teach anybody anything, I take part > in discussions to learn telling you what I think I know. > If I

Re: [Gambas-user] dynamic created Menus

2017-02-14 Thread Gianluigi
Hi all, first let me say that I do not want to teach anybody anything, I take part in discussions to learn telling you what I think I know. If I gave a different impression I apologize, it's my poor English that has struck again. And now the question, how is it that an event is in a module? See

Re: [Gambas-user] dynamic created Menus

2017-02-08 Thread Gianluigi
While should not, it work also in a Module. ' Gambas module file Public Sub AddMenuFromOutsideForm(hMenu As Menu) Dim hMenuItem As Object hMenuItem = New Menu(hMenu) As "mnCharacters" hMenuItem.Text = "this don't work" hMenuItem.Tag = "This do not work" hMenuItem = New Menu(hMenu) As

Re: [Gambas-user] dynamic created Menus

2017-02-08 Thread Gianluigi
Hi Karl, If you want to work with events, you should use a class. See attached example. Regards Gianluigi 2017-02-07 23:41 GMT+01:00 Karl Reinl : > Am Montag, den 06.02.2017, 15:36 +0100 schrieb Fabien Bodard: > > I think the good way is this one :-) > > > > Public Sub

Re: [Gambas-user] dynamic created Menus

2017-02-07 Thread Karl Reinl
Am Montag, den 06.02.2017, 15:36 +0100 schrieb Fabien Bodard: > I think the good way is this one :-) > > Public Sub AddMenuFromOutsideForm(hMenu As Menu) > Dim hMenuItem As Object > Dim hParent As Object = Object.Parent(hMenu) > > hMenuItem = New Menu(hMenu) > hMenuItem = New

Re: [Gambas-user] dynamic created Menus

2017-02-07 Thread Gianluigi
Hello Charlie, Your project does exactly what I wanted. Thank you very much Regards Gianluigi 2017-02-07 13:29 GMT+01:00 Charlie : > Karl seems happy now. I have modified the program for you Gianluigi, does > this do what you want? >

Re: [Gambas-user] dynamic created Menus

2017-02-07 Thread Charlie
Karl seems happy now. I have modified the program for you Gianluigi, does this do what you want? MenuExample.tar - Check out www.gambas.one -- View this

Re: [Gambas-user] dynamic created Menus

2017-02-07 Thread Karl Reinl
Am Montag, den 06.02.2017, 15:36 +0100 schrieb Fabien Bodard: > I think the good way is this one :-) > > Public Sub AddMenuFromOutsideForm(hMenu As Menu) > Dim hMenuItem As Object > Dim hParent As Object = Object.Parent(hMenu) > > hMenuItem = New Menu(hMenu) > hMenuItem = New

Re: [Gambas-user] dynamic created Menus

2017-02-06 Thread Gianluigi
Hi Charlie, thank you for the answer. Unfortunately, If I understand correctly, your example does not answer to my needs nor that of Karl. Regards Gianluigi 2017-02-06 17:04 GMT+01:00 Charlie : > Have a look at the code attached, the menu and menu items are all created > in

Re: [Gambas-user] dynamic created Menus

2017-02-06 Thread Charlie
Have a look at the code attached, the menu and menu items are all created in code. I think this will do what you need. MenuExample.tar Hope it helps. - Check out

Re: [Gambas-user] dynamic created Menus

2017-02-06 Thread Gianluigi
As you can dynamically assign a shortcut? This code do not work: hMenuItem.Text = Shortcut("this works", "{[Alt_R]t}") Regards Gianluigi 2017-02-06 15:36 GMT+01:00 Fabien Bodard : > I think the good way is this one :-) > > Public Sub AddMenuFromOutsideForm(hMenu As Menu)

Re: [Gambas-user] dynamic created Menus

2017-02-06 Thread Fabien Bodard
I think the good way is this one :-) Public Sub AddMenuFromOutsideForm(hMenu As Menu) Dim hMenuItem As Object Dim hParent As Object = Object.Parent(hMenu) hMenuItem = New Menu(hMenu) hMenuItem = New Menu(hMenu) Object.Attach(hMenuItem, hParent, "mnu_this_dont_work")

[Gambas-user] dynamic created Menus

2017-02-06 Thread Charlie Reinl
Salut, how can I use dynamic created Menus, when they are made outside the Form. I expanded an example from Gianluigi to show what I want. The problem is, the Click event is not fired, if the menu is not created in the forms class. MenuGroupTag-0.0.2.tar.gz Description: