In a script I select in list A (the left one in the screen shot). This fills list B.
If I then change the selection A, list B is not built afresh but amended by the new items.
Snippet of UI
Code: Select all
Gui Tab, 2 ; From existing TLB ------------------------------
Gui, Font, s10 w400, MS sans serif
Gui Add, Text, x020 y030 w200 h025 , % lang("UItxTbLbls")
Gui Add, Text, x230 y030 w150 h025 , % lang("UItxTbBtn")
Gui Add, Groupbox,x390 y030 w400 h170 , % lang("UItxTbPrp")
Gui Add, ListBox, x020 y050 w200 h200 gFn2SelInTbarList vTbCurrent AltSubmit, %lstTbLabels% ; list A
Gui Add, ListBox, x230 y050 w150 h200 gFn2SelInBtnList vBtnCurrent AltSubmit, %lstBtnCmds% ; list B
.....
Fn2SelInTbarList() { ; ------ Select from tool bar list
Gui, Submit, noHide ; get the varaible content
If (A_GuiEvent != "DoubleClick") {
return
} else { ; build button list
Fn2GetBtnData(TbCurrent)
Fn2FillBtnList() ; fill list lstBtnCmds
MsgBox «%lstBtnCmds%»
GuiControl, Choose, SysTabControl321, 2 ; Got to tab 2
GuiControl,, BtnCurrent, %lstBtnCmds%
}
}
«Nudge1ptUp|Nudge1ptDown|Nudge1ptLeft|Nudge1ptRight|AlignGfxTop|AlignGfxTBCenter|AlignGfxBottom|AlignGfxLeft|AlignGfxLRCenter|AlignGfxRight|RotateGfxClockwise|RotateGfxCounterClock|SetPatternSolid|SetPatternDashed»
At the second selection the message lists only the 6 items which should appear in the list box, but which appear in the list box appended to the previous ones:
«DocDirectionLTR|DocDirectionRTL|NumberUtilityITN|NumberUtilityNTI|NumberUtilityFTN|NumberUtilityNTF»
Obviously my GuiControl is not correct - but what is wrong here?