Jeannot40
Joined: 19 Jul 2008 Posts: 4
|
Posted: Sat Jul 19, 2008 4:12 pm Post subject: [solved]ListBox : no replace value with GuiControl |
|
|
Hello all
I am trying to write an application launcher. I have a problem to change the show list in a ListBox with GuiControl : the new list doesnt replace the old list but it's appended at the old values in the ListBox.
I have written a simplified code to expose my problem
| Code: |
#NoTrayIcon
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
items = menu1|menu2|menu3
;init window
Gui, Font, S12 CDefault, Arial
Gui, Add, Text, x6 y10 w250 h20, Choose an Application
Gui, Add, ListBox, vChoice w500 h300 hscroll vscroll AltSubmit
Gui, Add, Button, vSend gValideMenu x110 y340 w60 h21 +Default, &Send
Gui, Add, Button, vCancel gGuiClose x260 y340 w60 h21, Cancel
Gosub ShowMainWindow
Escape::
Gosub GuiClose
return
ShowMainWindow:
GuiControl, , Choice, %items%
Gui, Show,, Mainmenu
return
ValideMenu:
Gui, submit,
GuiControlGet, Choice
items = appli1 menu%Choice%|appli2 menu%Choice%|appli3 menu%Choice%
Gosub ShowMainWindow
return
GuiClose:
Gui cancel
GuiEscape:
ExitApp
|
Please help me; I search , I try but don't found
Last edited by Jeannot40 on Sat Jul 19, 2008 4:35 pm; edited 1 time in total |
|