请教:根据分类信息选择子类(GUICtrlCreateCombo)
本帖最后由 tvro 于 2009-8-23 15:14 编辑请教:根据分类信息选择子类(GUICtrlCreateCombo),子类怎么也出不来!!!!!!!
$Combo1 = GUICtrlCreateCombo ( "选择分类信息", 30, 60 , 120 , 25 , 0x0003)
$ClassInfo = IniRead("setup.ini" , "Class" , "分类" , "")
GUICtrlSetData(-1 , $ClassInfo)
$InClassInfo = GUICtrlRead($Combo1)
$Combo2 = GUICtrlCreateCombo ( "选择子类信息", 30, 90 , 120 , 25 , 0x0003)
$SubclassInfo = IniRead("setup.ini" , "Class" , $InClassInfo , "")
GUICtrlSetData(-1 , $SubclassInfo)
setup.ini
分类 = 设备|终端|存储
设备 = 台式计算机|便携计算机|其他
终端 = 字符终端|WIN终端|远程终端|其他
存储 = 磁盘阵列|磁带库|光盘驱动器|内存|硬盘|移动硬盘|其他
先谢谢!!!!!!!!! 本帖最后由 netegg 于 2009-8-23 09:49 编辑
$Combo1 = GUICtrlCreateCombo ( "选择分类信息", 30, 60 , 120 , 25 , 0x0003)
$ClassInfo = IniRead("setup.ini" , "Class" , "分类" , "")
GUICtrlSetData(-1 , $ClassInfo)
$Combo2 =GUICtrlCreateCombo ( "选择子类信息", 30, 90 , 120 , 25 , 0x0003)
switch GUICtrlRead($Combo1)
case "分类"
guisetdata($Combo2, IniRead("setup.ini" , "Class" , "分类" , ""))
case else
guisetdata($Combo2, "")
endswitch 明白,收到.万分感谢,好人呀!!!!!!!!!!!!!!!!!!!!!!!!! 感谢netegg给我的思路
$Combo1 = GUICtrlCreateCombo ( "选择分类信息", 30, 60 , 120 , 25 , 0x0003)
GUICtrlSetData($Combo1 , IniRead("setup.ini" , "Class" , "分类" , ""))
$Combo2 =GUICtrlCreateCombo ( "选择子类信息", 30, 90 , 120 , 25 , 0x0003)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Combo1
GUICtrlSetData($Combo2,"")
GUICtrlSetData($Combo2, IniRead("setup.ini" , "Class" , GUICtrlRead($Combo1) , ""))
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
页:
[1]