Zombryo Posted July 14, 2008 Share Posted July 14, 2008 Ok, first this script is working as intended but for 1 part, it doesnt show the forst tab unless i click on another tab and come back, any idea how to fix this little bug ? For the rest the program is fully operational, sorry for the french variable since im french hehehe. CODE#include "Process.au3" #include <GuiConstants.au3> Global $Fichier = "Logiciel.ini" ; fichier contenant les logiciels dim $compteur=0 Dim $Demarrer,$Quitter ; Boutons Dim $Boite_Largeur=500,$Boite_Longueur=700 ; La boite d'interface graphique (dimension) ;>>>>>>>>>>>>> CREATE GUI <<<<<<<<<<<<<<<<< Opt("GUIOnEventMode", 1) ; Change to OnEvent mode $mainwindow = GUICreate("Installation Logiciel", 600, 400) $Quitterbutton = GUICtrlCreateButton("Quitter", 250, 350, 60) GUICtrlSetOnEvent($Quitterbutton, "CLOSEClicked") $lbl1=GUICtrlCreateLabel("Choisir les logiciels a installer...", 30, 10) $lbl3=GUICtrlCreateLabel("Tableau", 300, 30,200) $okbutton = GUICtrlCreateButton("Crée moi une interface", 25, 350, 150) $Roger=GUICtrlCreateButton("Installer",350,350,75) GUICtrlSetOnEvent($okbutton, "BtnDemarrer") GUICtrlSetOnEvent($Roger,"Installer") GUISetState(@SW_SHOW) dim $programmetotal=0 dim $tableau[100] Dim $tableau_rep[100] ;========================================================================================= While 1 Sleep(1000) ; Idle around WEnd dim $tab1,$tab2,$tab3,$tab4, $r dim $boucleprogramme dim $boucleonglet=0 $programmetotal=Iniread("logiciel.ini","information","programmetotal","") Func BtnDemarrer() GUICtrlCreateTab(10,50,500,300) $boucleonglet=IniRead($Fichier,"information","nombreonglet",""); number of tabitems dim $z,$y,$x,$w=0,$j=0 For $r=0 to $boucleonglet $y=100 $x=40 $boucleprogramme= Iniread($Fichier,"secteur"& $z,"nombreprogramme",""); number of loops $onglet= IniRead($Fichier,"secteur"& $z,"descrip","") guictrlcreatetabitem($onglet) $bob=Iniread($Fichier,"secteur"& $z,"Description","") $w=1 If $boucleprogramme <> 0 Then For $b=1 to $boucleprogramme; loop for the checkboxes GUICtrlCreateLabel($bob,40,80) ; Création des checkbox et incrémentation pour prendre chaque logiciel $nomcheckbox=Iniread($Fichier,"secteur"& $z,"Logiciel" & $w,"") $tableau[$j]=GUICtrlCreateCheckbox($nomcheckbox,$x,$y,300,20) $y=$y+20 $tableau_rep[$j]=Iniread("logiciel.ini","secteur"& $z,"Path" & $w,"") $w=$w+1 GUICtrlSetData($lbl3,$tableau_rep[$j]) $j=$j+1 sleep(250) Next EndIf $z=$z+1 Next EndFunc Link to comment Share on other sites More sharing options...
DaRam Posted July 14, 2008 Share Posted July 14, 2008 (edited) You need a terminating: GUICtrlCreateTabItem("") ; end tabitem definition After creating the tab items (probably at the end of Func BtnDemarrer) Also, do indent your code. It makes it more readable and next time you post it will probably get a faster response. Ok, first this script is working as intended but for 1 part, it doesnt show the forst tab unless i click on another tab and come back, any idea how to fix this little bug ? For the rest the program is fully operational, sorry for the french variable since im french hehehe. CODE#include "Process.au3" #include <GuiConstants.au3> Global $Fichier = "Logiciel.ini" ; fichier contenant les logiciels dim $compteur=0 Dim $Demarrer,$Quitter ; Boutons Dim $Boite_Largeur=500,$Boite_Longueur=700 ; La boite d'interface graphique (dimension) ;>>>>>>>>>>>>> CREATE GUI <<<<<<<<<<<<<<<<< Opt("GUIOnEventMode", 1) ; Change to OnEvent mode $mainwindow = GUICreate("Installation Logiciel", 600, 400) $Quitterbutton = GUICtrlCreateButton("Quitter", 250, 350, 60) GUICtrlSetOnEvent($Quitterbutton, "CLOSEClicked") $lbl1=GUICtrlCreateLabel("Choisir les logiciels a installer...", 30, 10) $lbl3=GUICtrlCreateLabel("Tableau", 300, 30,200) $okbutton = GUICtrlCreateButton("Crée moi une interface", 25, 350, 150) $Roger=GUICtrlCreateButton("Installer",350,350,75) GUICtrlSetOnEvent($okbutton, "BtnDemarrer") GUICtrlSetOnEvent($Roger,"Installer") GUISetState(@SW_SHOW) dim $programmetotal=0 dim $tableau[100] Dim $tableau_rep[100] ;========================================================================================= While 1 Sleep(1000) ; Idle around WEnd dim $tab1,$tab2,$tab3,$tab4, $r dim $boucleprogramme dim $boucleonglet=0 $programmetotal=Iniread("logiciel.ini","information","programmetotal","") Func BtnDemarrer() GUICtrlCreateTab(10,50,500,300) $boucleonglet=IniRead($Fichier,"information","nombreonglet",""); number of tabitems dim $z,$y,$x,$w=0,$j=0 For $r=0 to $boucleonglet $y=100 $x=40 $boucleprogramme= Iniread($Fichier,"secteur"& $z,"nombreprogramme",""); number of loops $onglet= IniRead($Fichier,"secteur"& $z,"descrip","") guictrlcreatetabitem($onglet) $bob=Iniread($Fichier,"secteur"& $z,"Description","") $w=1 If $boucleprogramme <> 0 Then For $b=1 to $boucleprogramme; loop for the checkboxes GUICtrlCreateLabel($bob,40,80) ; Création des checkbox et incrémentation pour prendre chaque logiciel $nomcheckbox=Iniread($Fichier,"secteur"& $z,"Logiciel" & $w,"") $tableau[$j]=GUICtrlCreateCheckbox($nomcheckbox,$x,$y,300,20) $y=$y+20 $tableau_rep[$j]=Iniread("logiciel.ini","secteur"& $z,"Path" & $w,"") $w=$w+1 GUICtrlSetData($lbl3,$tableau_rep[$j]) $j=$j+1 sleep(250) Next EndIf $z=$z+1 Next EndFunc Edited July 14, 2008 by DaRam Link to comment Share on other sites More sharing options...
Zombryo Posted July 15, 2008 Author Share Posted July 15, 2008 (edited) Thnx a lot DaRam Edited July 15, 2008 by Zombryo Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now