Re: [Gambas-user] How to mention (in code) widgets which are in sub form , in the main fourm's code ?

2016-02-18 Thread Charlie
OK machackerx86 I have put the attached together for you. It is a start, there are probably things to change or add but see what you think. URL-List.tar -- View this message in context: http://gambas.8142.n7.nabble.com/How-to-mention

Re: [Gambas-user] How to mention (in code) widgets which are in sub form , in the main fourm's code ?

2016-02-16 Thread Charlie
I'll look at your request tomorrow. The error your getting from my code is because you do not have a ListBox1 on FMain. If you add one it will work. If you have one change the name in my code to match the name of your ListBox. You also mention a ComboBox not a ListBox, which do you want, or is i

Re: [Gambas-user] How to mention (in code) widgets which are in sub form , in the main fourm's code ?

2016-02-16 Thread zxMarce
You can also -instead of using variables- publish the required methods/properties from a form, so other parts of the program can do whatever you need in a more encapsulated way. Assume Form1 needs to add text to a control on Form2. I would go as follows: FORM2 CODE: * Public Sub AddText(newText

Re: [Gambas-user] How to mention (in code) widgets which are in sub form , in the main fourm's code ?

2016-02-16 Thread Charlie
*You can't directly access the ListBox but you can pass a variable so in FMain try this: - *Public sTextForListBox As String[] Public Sub Button1_Click() Form1.Show ListBox1.List = sTextForListBox End *In your Form1 enter this: - *Public Sub Form_Open() FMain.sTextForListBox = ["Hello World", "