I want to make an array of GUI Edit controls and use them.
This code:
loop % grade+1
{
...
Gui, Add, Text, ... vwtf%A_Index%, % "Σημείο " . A_Index
}
doesnt work. Calling
Gui, Submit, NoHide
loop % grade+1
{
MsgBox % "InputArray(" . A_Index . ") = " . wtf%A_Index%
}
returns me a bunch of message boxes indicating each wtf%A_Index% is empty.
I read the following and couldn't still make sense. I have followed the advice on the first colsely but it doesn't work, and I cant really figure the advice from the second
1: http://www.autohotkey.com/board/topic/9 ... -an-array/
2: http://www.autohotkey.com/board/topic/9 ... i-control/
Array of GUI Edit controls not submitting Topic is solved
Re: Array of GUI Edit controls not submitting
I don't see a problem with how you are trying to create the pseudo-array. The problem appears to be that you are trying to associate a variable with a text control. The docs don't indicate that a variable can be associated with that type of control.
Ex:
Ex:
Code: Select all
Loop, 3 {
Gui, Add, Text, vTextVar%A_Index%, This is some text... %A_Index%
Gui, Add, Edit, W176 H20 vEditVar%A_Index%
}
Gui, Add, Button, gSub Default, Submit
Gui, Show
return
Sub:
Gui, Submit, Nohide
MsgBox, % "TextVar1: " TextVar1
. "`nEditVar1: " EditVar1
. "`nTextVar2: " TextVar2
. "`nEditVar2: " EditVar2
. "`nTextVar3: " TextVar3
. "`nEditVar3: " EditVar3
return
GuiClose:
ExitApp
Last edited by kon on 14 Mar 2014, 17:22, edited 1 time in total.
Re: Array of GUI Edit controls not submitting
This is unbelievable. Instead of assigning them on the edit fields I wanted, I assigned them in the text fields that were kind of a title.
Thank you very much!
Thank you very much!
Re: Array of GUI Edit controls not submitting Topic is solved
To correct myself, you can associate a variable with a text control. It can be used with, for example, GuiControlGet as the ControlID parameter.
Who is online
Users browsing this forum: No registered users and 222 guests