dmorand Posted January 11, 2009 Posted January 11, 2009 I'm trying to determine which listview I'm in when I click on the launch_app_btn because based on what listview I'm in I'll need to call a different function. I can't seem to figure out how to determine which one I've clicked on. Any help would be appreciated. Here is a code snippet: expandcollapse popup$launch_app_btn = GUICtrlCreateButton("Launch Application", ((725/2)-55),435,110,30) $app_group = GUICtrlCreateGroup("Stand Alone Applications", 4, 8, 705, 122) $appList= GUICtrlCreateListView("Application|Version|Location", 8, 22, 694, 100,$LVS_SORTASCENDING + $LVS_EX_CHECKBOXES) GUICtrlSendMsg($appList, $LVM_SETCOLUMNWIDTH, 0, 200) GUICtrlSendMsg($appList, $LVM_SETCOLUMNWIDTH, 2, 400) createListView($iniFile,$ini,$appList,"application") $web_group = GUICtrlCreateGroup("Web Applications", 4, 138, 705, 160) $webList= GUICtrlCreateListView("Application|Version|Address", 8, 152, 694, 138,$LVS_SORTASCENDING) GUICtrlSendMsg($webList, $LVM_SETCOLUMNWIDTH, 0, 200) GUICtrlSendMsg($webList, $LVM_SETCOLUMNWIDTH, 2, 400) createListView($iniFile,$ini,$webList,"web") $support_group = GUICtrlCreateGroup("Support Sites", 4, 308, 705, 122) $suppList= GUICtrlCreateListView("Application|Version|Address", 8, 322, 694, 100,$LVS_SORTASCENDING) GUICtrlSendMsg($suppList, $LVM_SETCOLUMNWIDTH, 0, 200) GUICtrlSendMsg($suppList, $LVM_SETCOLUMNWIDTH, 2, 400) createListView($iniFile,$ini,$suppList,"support") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $QuitItem Exit Case $BagelItem Run('notepad \\isops\analysts\_Application_Launcher\bagel_list_v2.txt'); Case $ReleaseItem Run('notepad \\ISOPS\Analysts\_Application_Launcher\Application_Launcher_help.txt'); Case $AboutItem Case $launch_app_btn _GetApplication() EndSwitch WEnd
FireFox Posted January 11, 2009 Posted January 11, 2009 @dmorand GuiCtrlRead(GuiCtrlRead($applist)) @GUICtrl_ID Cheers, FireFox.
dmorand Posted January 11, 2009 Author Posted January 11, 2009 (edited) @dmorand GuiCtrlRead(GuiCtrlRead($applist)) @GUICtrl_ID Cheers, FireFox. The problem I'm having is that I've got 3 the listviews but it's not taking into account what is the current listviewitem I've selected. $selApp = GuiCtrlRead($applist) $selWeb = GuiCtrlRead($weblist) $selSupp = GuiCtrlRead($supplist) Example: I click on an item in $appList, and when I call GuiCtrlRead($appList) I get the element number of the item I selected. If I then click on an item in $webList, but call GuiCtrlRead($appList) I still get a value. Edited January 11, 2009 by dmorand
FireFox Posted January 11, 2009 Posted January 11, 2009 ...read my reply its not GuiCtrlRead($applist) but GuiCtrlRead(GuiCtrlRead($applist)) Cheers, FireFox.
dmorand Posted January 11, 2009 Author Posted January 11, 2009 ...read my reply its not GuiCtrlRead($applist) but GuiCtrlRead(GuiCtrlRead($applist))Cheers, FireFox.I read your reply, but when I click on an item in a different list, I'm still getting a value returned from the GuiCtrlRead(GuiCtrlRead($applist)). It's like it keeps track of the item I clicked on in that list, or any list. Is there a way to clear out the item selected from the list?
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