Search the Community
Showing results for tags 'independet'.
-
Hello, i have read the wiki for tabs, and search in some sites for code ideas, and get what i have now 1st i have the broblem that wen i choice one iten the image appears in all tabs i resolved that with the -----GUISwitch($GUI, $TabID)---- Now i have a problema that wen i choice the iten the image doesn t appear only if i change tab i go back to the tab Any idea? #include <GuiConstantsEx.au3> #include <GuiTab.au3> Global $dir =("FULL\") $GUI = GUICreate("Test Script", 500, 500) $hTab = GUICtrlCreateTab(5, 10, 500, 450) $Tab1 = GUICtrlCreateTabItem("Tab1") $Tab2 = GUICtrlCreateTabItem("Tab2") $Pic1 = GUICtrlCreatePic("", 15, 202, 25, 25); pic coordenades and size $Pic2 = GUICtrlCreatePic("", 15, 234, 25, 25) $Pic3 = GUICtrlCreatePic("", 15, 264, 25, 25) $Combo3 = GUICtrlCreateCombo("Corpo", 47, 268, 65, 25); combobox place GUICtrlSetFont(-1, 8, 400, 0, "Arial") jcorpo($combo3) ; getdata funcion $Combo2 = GUICtrlCreateCombo("Corpo", 47, 238, 65, 25) GUICtrlSetFont(-1, 8, 400, 0, "Arial") jcorpo($combo2) $Combo1 = GUICtrlCreateCombo("Corpo", 47, 206, 65, 25) GUICtrlSetFont(-1, 8, 400, 0, "Arial") jcorpo($combo1) $Tab3 = GUICtrlCreateTabItem("Tab3") ;GUICtrlSetState($Tab2, $GUI_SHOW); tessting code GUICtrlCreateTabItem("") $Switch_Button = GUICtrlCreateButton("Switch Next", 20, 470, 80, 20) GUISetState(@SW_SHOW, $GUI) While 1 Switch GUIGetMsg() Case $combo1 GUISwitch($GUI, $Tab2) img1($combo1, $Pic1, 15, 202) GUISwitch($GUI) case $combo2 img1($combo2, $pic2, 15, 234) Case $combo3 img1($combo3, $Pic3, 15, 264) Case $GUI_EVENT_CLOSE Exit Case $Switch_Button $iCurrent_TabIndex = _GUICtrlTab_GetCurSel($hTab) $iNext_TabIndex = $iCurrent_TabIndex Switch $iCurrent_TabIndex Case 0, 1 $iNext_TabIndex += 1 Case 2 $iNext_TabIndex = 0 EndSwitch _GUICtrlTab_SetCurSel($hTab, $iNext_TabIndex) EndSwitch WEnd Func img1($var, $imp, $x1, $y1) ; $Read = GUICtrlRead($var) If $Read = "A" Then $imp = GUICtrlCreatePic($dir & "A.bmp", $x1, $y1, 25, 25) EndIf If $Read = "B" Then $imp = GUICtrlCreatePic($dir & "B.bmp", $x1, $y1, 25, 25) EndIf If $Read = "C" Then $imp = GUICtrlCreatePic($dir & "C.bmp", $x1, $y1, 25, 25) EndIf If $Read = "" Then $imp = GUICtrlCreatePic($dir & "", $x1, $y1, 25, 25) ;Else ; $imp = GUICtrlCreatePic($dir & "null.bmp", $x1, $y1, 25, 25) EndIf EndFunc Func jcorpo($varcomb) GUICtrlSetData($varcomb, "A|B|C") EndFunc func _exit() Exit EndFunc