[NSIS] Comment rafraichir une listBox ?
Salut,
dans une page customisé, j 'ai :
- une Combo box;
- un bouton;
- une list box;
Je selectionne un element dans le combobox, ensuite je clique sur le bouton et normalement la listbox doit se remplir!
Mais la rien ne se remplit SAUF , lorsque je fais suivant puis retour et la ben la listbox est remplit!
Pouvez vous m'aider???
MERCI
Rafraîchir listItem listBox, Comment rafraichir une listBox
Voici le code: (il manque le début, à la demande... )
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| Function .onInit
;----------- Exctraction du fichier ini ------------
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ChoixLecteur2.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ListeLecteur.ini"
FunctionEnd
Function AfficherListeLecteurM ;Function name defined with Page command
!insertmacro MUI_INSTALLOPTIONS_WRITE "ChoixLecteur2.ini" "Field 1" "ListItems" $list
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ChoixLecteur2.ini"
FunctionEnd
Function LeaveCustom1
;Actions en fonction des bouttons AC et SC
;!insertmacro MUI_INSTALLOPTIONS_READ $R6 "InstallOptionsFile.ini" "Field 1" "HWND"
!insertmacro MUI_INSTALLOPTIONS_READ $0 "ChoixLecteur2.ini" "Settings" "State"
StrCmp $0 0 Done
StrCmp $0 2 AC
StrCmp $0 3 SC
Abort
AC:
!insertmacro MUI_INSTALLOPTIONS_READ $l "ChoixLecteur2.ini" "Field 1" "state"
StrCpy $lecteur "$lecteur|$l"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ChoixLecteur2.ini" "Field 4" "ListItems" "$lecteur"
!insertmacro MUI_INSTALLOPTIONS_READ $0 "ChoixLecteur2.ini" "Field 1" "State"
/* !insertmacro MUI_INSTALLOPTIONS_READ $1 "ChoixLecteur2.ini" "Field 4" "HWND"
EnableWindow $1 $0
!insertmacro MUI_INSTALLOPTIONS_READ $1 "ChoixLecteur2.ini" "Field 4" "HWND2"
EnableWindow $1 $0
*/ ; ==> les EnableWindow fonctionne en live( il desactive les les lignes du listbox)
;!insertmacro MUI_INSTALLOPTIONS_SHOW
;WriteINIStr $EXEDIR"\ChoixLecteur2.ini" "Field 4" "ListItems" "$lecteur"
Abort
SC:
MessageBox MB_OK|MB_ICONSTOP "Erreur InstallOptions :$\r$\n$0"
Abort
Done:
FunctionEnd |
Rafraîchir listItem listBox, Comment rafraichir une listBox
Citation:
Envoyé par
shawn12
Qu'est-ce que c'est comme langage ?
C'est du script, propre à NSIS, permettant de créer des installateurs (.exe).
différent des fichier .MSI.
Ou l'on peut appeler des fonctions de l'API Windows!
Je débute, je pourrai pas vous en dire plus...
DOC:
http://www.todae.fr/nsis/docs/Contents.html