
Know_Fear
Members-
Posts
15 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Know_Fear's Achievements

Seeker (1/7)
0
Reputation
-
Selecting Multiple ListView Items with the Mouse
Know_Fear replied to Know_Fear's topic in AutoIt General Help and Support
Well no.... That's the effect I want, and sorry if I am not being exactly clear, but you are starting your rectangle in the white space to the right of col 3. My listview in posts 3 and 4 above are too wide to have whitespace on the right, and too long to have whitepace on the bottom. As said, there is NO place to start one's "drag-select" rectangle.... Try this one, and tell me if you can select more than 1 line with mouse "drag-select": #include <GUIConstantsEx.au3> ;#include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <ListViewConstants.au3> Example() Func Example() GUICreate("listview items", 220, 250, 100, 200, -1, $WS_EX_ACCEPTFILES) GUISetBkColor(0x00E0FFFF) ; will change background color Local $idListview = GUICtrlCreateListView("col1|col2|col3|col4|co5|col6|col7", 10, 10, 200, 150,BitOR($LVS_SHOWSELALWAYS, $LVS_REPORT)) Local $idButton = GUICtrlCreateButton("Value?", 75, 170, 70, 20) Local $idItem1 = GUICtrlCreateListViewItem("item2|col22|col23|col22|col23|col22|col23", $idListview) Local $idItem2 = GUICtrlCreateListViewItem("item1|col12|col13|col22|col23|col22|col23", $idListview) Local $idItem3 = GUICtrlCreateListViewItem("item3|col32|col33|col22|col23|col22|col23", $idListview) Local $idItem4 = GUICtrlCreateListViewItem("item23|col632|col3433|col22|col23|col22|col23", $idListview) Local $idItem5 = GUICtrlCreateListViewItem("items3|col332|col7533|col22|col23|col22|col23", $idListview) Local $idItem6 = GUICtrlCreateListViewItem("item2|col22|col23|col22|col23|col22|col23", $idListview) Local $idItem7 = GUICtrlCreateListViewItem("item1|col12|col13|col22|col23|col22|col23", $idListview) Local $idItem8 = GUICtrlCreateListViewItem("item3|col32|col33|col22|col23|col22|col23", $idListview) Local $idItem9 = GUICtrlCreateListViewItem("item23|col632|col3433|col22|col23|col22|col23", $idListview) Local $idItem10 = GUICtrlCreateListViewItem("items3|col332|col7533|col22|col23|col22|col23", $idListview) GUICtrlCreateInput("", 20, 200, 150) GUICtrlSetState(-1, $GUI_DROPACCEPTED) ; to allow drag and dropping GUISetState(@SW_SHOW) GUICtrlSetData($idItem2, "ITEM1") GUICtrlSetData($idItem3, "||COL33") GUICtrlDelete($idItem1) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idButton MsgBox($MB_SYSTEMMODAL, "listview item", GUICtrlRead(GUICtrlRead($idListview)), 2) Case $idListview MsgBox($MB_SYSTEMMODAL, "listview", "clicked=" & GUICtrlGetState($idListview), 2) EndSwitch WEnd EndFunc ;==>Example -
Selecting Multiple ListView Items with the Mouse
Know_Fear replied to Know_Fear's topic in AutoIt General Help and Support
I'm sorry Franscesco - I can't tell what it is you're trying to say. Can you help me out with a more straightforward answer regarding selection of multiple items with mouse "drag-select" in a full listview? -
Selecting Multiple ListView Items with the Mouse
Know_Fear replied to Know_Fear's topic in AutoIt General Help and Support
Thanks careca - I very much appreciate the replies. I need to figure out what problem I am trying to solve, either an autoit behavior, or a quirk in my win7 and xp systems.........On the code posted below, Is anyone else out there seeing the same behavior as ether careca (can "drag select" MULTIPLE lines anywhere in a listview)........ or the behavior I see (can only select 1 item with the mouse) ??? #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <ListViewConstants.au3> Example() Func Example() GUICreate("listview items", 220, 250, 100, 200, -1, $WS_EX_ACCEPTFILES) GUISetBkColor(0x00E0FFFF) ; will change background color Local $idListview = GUICtrlCreateListView("col1 |col2|col3 ", 10, 10, 200, 150,BitOR($LVS_SHOWSELALWAYS, $LVS_REPORT)) Local $idButton = GUICtrlCreateButton("Value?", 75, 170, 70, 20) Local $idItem1 = GUICtrlCreateListViewItem("item2|col22|col23", $idListview) Local $idItem2 = GUICtrlCreateListViewItem("item1|col12|col13", $idListview) Local $idItem3 = GUICtrlCreateListViewItem("item3|col32|col33", $idListview) Local $idItem4 = GUICtrlCreateListViewItem("item23|col632|col3433", $idListview) Local $idItem5 = GUICtrlCreateListViewItem("items3|col332|col7533", $idListview) Local $idItem6 = GUICtrlCreateListViewItem("item2|col22|col23", $idListview) Local $idItem7 = GUICtrlCreateListViewItem("item1|col12|col13", $idListview) Local $idItem8 = GUICtrlCreateListViewItem("item3|col32|col33", $idListview) Local $idItem9 = GUICtrlCreateListViewItem("item23|col632|col3433", $idListview) Local $idItem10 = GUICtrlCreateListViewItem("items3|col332|col7533", $idListview) GUICtrlCreateInput("", 20, 200, 150) GUICtrlSetState(-1, $GUI_DROPACCEPTED) ; to allow drag and dropping GUISetState(@SW_SHOW) GUICtrlSetData($idItem2, "ITEM1") GUICtrlSetData($idItem3, "||COL33") GUICtrlDelete($idItem1) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idButton MsgBox($MB_SYSTEMMODAL, "listview item", GUICtrlRead(GUICtrlRead($idListview)), 2) Case $idListview MsgBox($MB_SYSTEMMODAL, "listview", "clicked=" & GUICtrlGetState($idListview), 2) EndSwitch WEnd EndFunc ;==>Example -
Selecting Multiple ListView Items with the Mouse
Know_Fear replied to Know_Fear's topic in AutoIt General Help and Support
Where are y'all starting the "drag select" rectangle in the posted example? In the list itself??? .... Or in the white space below??? Try starting the rectangle IN the list (or generate a longer list that is larger than the display window). Are you still able to use mouse "drag select" to select more than 1 item? As said, if we have a full list that is larger than the window, then there is no white space to start the rectangle in. And only the single item gets selected This is on my Windows 7 and XP machines... -
Selecting Multiple ListView Items with the Mouse
Know_Fear replied to Know_Fear's topic in AutoIt General Help and Support
??? Not sure what Question you are addressing careca, but it's not mine Or ?? perhaps there is some difference in the version you are running?? (I am running the most recent autoit version...) In any case, the posted example directly above also displays the issue I am trying to get around - i.e., one can NOT use the mouse-click-drag rectangle to select multiple items in the list (unless one starts the click-drag-rectangle in the white space below the last list row -- which is obviously NOT a solution for lists that are longer than the display area). As stated above, I'd like my list-view to behave as standard Windows file select windows - where one starts the mouse-click-drag-rectangle off to the side white space (between the vertical slider bar and the file list), and one can select any number of contiguous items in the file list. Ideas? -
Selecting Multiple ListView Items with the Mouse
Know_Fear replied to Know_Fear's topic in AutoIt General Help and Support
Anyone? -
Snippet from from the helpfile, TCPRecv example 2: ; If the end of the file is reached. If BinaryMid($bData, 1 + $iDataLen - $iEOFLen, $iEOFLen) = $bEOF Then ; Strip the EOF code from the file data. $bData = BinaryMid($bData, 1, $iDataLen - $iEOFLen) ; Set the EOFReached to True. $fEOFReached = True EndIf It looks like the TCPRecv example (example 2) code is searching for the @CRLF&"{EOF}" data that the TCPSend example (example 2) put at the end of the sent data, and declares that it is the end-of-file if the data pattern is found. Q - what happens if the @CRLF&"{EOF}" happens to be split up between the last 4096 block, and the second last block? I assume it would fail end-of-file detection by this method? If so, how is this sort of issue usually handled?
-
Selecting Multiple ListView Items with the Mouse
Know_Fear replied to Know_Fear's topic in AutoIt General Help and Support
Not sure what yo mean AB - do you mean Windows Explorer? If so, then yes! That is the behavior I am wanting to duplicate for my ListView above - it looks like this (Win7 Windows Explorer...) - -
Selecting Multiple ListView Items with the Mouse
Know_Fear replied to Know_Fear's topic in AutoIt General Help and Support
To illustrate the issue - With this extended style... $My_List = GUICtrlCreateListView("", 5, 45, 602, $Media_Window_Height-50, BitOR($LVS_SHOWSELALWAYS, $LVS_REPORT)) _GUICtrlListView_SetExtendedListViewStyle($My_List, ($LVS_EX_GRIDLINES)) ;_GUICtrlListView_SetExtendedListViewStyle($My_List, BITOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT)) ....here is screenshot of what I get when using the mouse to draw the normal select-rectangle - note that only column 1 (items 5 through 11) change color - And with FullRowSelect extended style..... $My_List = GUICtrlCreateListView("", 5, 45, 602, $Media_Window_Height-50, BitOR($LVS_SHOWSELALWAYS, $LVS_REPORT)) ;_GUICtrlListView_SetExtendedListViewStyle($My_List, ($LVS_EX_GRIDLINES)) _GUICtrlListView_SetExtendedListViewStyle($My_List, BITOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT)) ....here is screenshot of what I get - note that there is NO way to draw a select-rectangle since as soon as one clicks, then one-and-only-one row (row 8 Fountainhead) is selected (multiple items can only be selected using the keyboard and some mouse clicks ) - As said above, everything works functionaly.........., but I would like to be able to use the mouse select-rectangle more intuitively and have it select the Titles in column 2 instead of the Item Numbers in column 1.... -
I think my example above is probably faster - It doesn't process an entry in the tree View if it contains a "." (i.e, if it is a file, as opposed to a directory). OTH, I do step through each and every item in the Tree View (in reverse order). If it doesn't have a ".", then it's a Directory, and then I see if it has any children. If not, whack it! But whatever the case, I'm grateful for the answers from a different perspective, and the additional info !
-
I have a program that deals with disk directories, and occasionally I need to remove from my list those folder(s) that have no files in them. To do this, I start at the end of my TreeView and move back toward the beginning and delete any items that have no "Children" (and are not themselves files). This works fine, but it would be a bit faster and cleaner if I had a good way to get the LAST item's handle in a TreeView (as opposed to how I now do it - by looping through the total number of items and repeatedly getting the _GUICtrlTreeView_GetNext ...) Q ===> I see that there is a UDF that gets me the handle to the FIRST item in a TreeView (_GUICtrlTreeView_GetFirstItem), but I see no function to get the LAST item in a TreeView. Am I cross-eyed and just missing it??? Or is there a cleaner faster way than what I do above?? Func Check_For_And_Remove_Child_Less_Branches($h_Tree_View) $Total_Number_Of_Tree_View_Items = _GUICtrlTreeView_GetCount($h_Tree_View) $Next_Tree_View_Item_Handle = _GUICtrlTreeView_GetFirstItem($h_Tree_View) For $i = 1 to $Total_Number_Of_Tree_View_Items ; get to END of Tree View and get last items handle $Current_Tree_View_Item_Handle = $Next_Tree_View_Item_Handle $Next_Tree_View_Item_Handle = _GUICtrlTreeView_GetNext($h_Tree_View, $Current_Tree_View_Item_Handle) ; gets the next items handle in the Tree View based on the current items handle Next ; $Current_Tree_View_Item_Handle is now at the last item in the Tree View List For $i = 1 to $Total_Number_Of_Tree_View_Items ; step through all Tree View items to find non-file entries $Tree_View_Text = _GUICtrlTreeView_GetText($h_Tree_View, $Current_Tree_View_Item_Handle) ; get the Tree View List items Full Path text $Prev_Tree_View_Item_Handle = _GUICtrlTreeView_GetPrev($h_Tree_View, $Current_Tree_View_Item_Handle) ; gets the prev items handle in the Tree View based on the current items handle If NOT StringInStr($Tree_View_Text, ".") Then ; dont loop if it IS a file like a .mp4.... $Number_Of_Children = _GUICtrlTreeView_GetChildCount($h_Tree_View, $Current_Tree_View_Item_Handle) ;MsgBox("", "", " $Tree_View_Text = " & $Tree_View_Text & " $Number_Of_Children = " & $Number_Of_Children) If $Number_Of_Children < 1 Then _GUICtrlTreeView_Delete($h_Tree_View, $Current_Tree_View_Item_Handle) EndIf EndIf $Current_Tree_View_Item_Handle = $Prev_Tree_View_Item_Handle Next EndFunc
-
Selecting Multiple ListView Items with the Mouse
Know_Fear replied to Know_Fear's topic in AutoIt General Help and Support
uhg... I edited the above, as I had written "rows" instead of "columns".... Hope my question makes more sense now. -
So, I have this nicely working script that operates on a ListView - cut / past / copy / delete all work fine. List View is created with: $LV_List = GUICtrlCreateListView("", 5, 45, 602, 400, BitOR($LVS_SHOWSELALWAYS, $LVS_REPORT)) _GUICtrlListView_SetExtendedListViewStyle($LV_List, BitOR($LVS_EX_GRIDLINES, $LVS_EX_DOUBLEBUFFER)) ;;;;;;;;;;;;; , $LVS_EX_FULLROWSELECT)) My ListView has 3 columns, the first is a narrow column in which I put the row number, and the other 2 columns contain the data I want to look at and act upon. This all works, and I can select and act upon single or multiple rows. But here's the ISSUE ===> When I use the normal Click-Hold-Drag mouse-rectangle to select the rows I want, ONLY the selected items in Column 1 are "sensitive" to the mouse-rectangle, and only they turn the Selected-Blue-Color. (However, everything works as I intend, and my cut / copy / delete stuff acts upon all of the rows that I have selected.) What I WOULD LIKE ===> To have either all items in the rows, or perhaps just the items in Column 2 (instead of the default Column 1) sensitive to the normal Click-Hold-Drag mouse-rectangle and to turn Selected-Blue-Color. This would look and feel more "normal", much like how one selects items in MSWindows' "Detailed" file view windows. (As you can see above, I tried using $LVS_EX_FULLROWSELECT. As advertised, the entire row turns the Selected-Blue-Color. The PROBLEM with this is that there is nowhere to start drawing the Mouse Rectangle from. As soon as one clicks in order to start drawing the rectangle, then ONLY that single row is selected, and no rectangle is drawn. When using $LVS_EX_FULLROWSELECT, it seems that multiple rows can ONLY be selected by using the keyboard in conjunction with the mouse ... ) This isn't a HUGE issue, since the user gets used to using the mouse to select rows based on drawing the rectangle around the item count numbers in Column 1. But it would be more uniform with most other behaviors that use the mouse to select multiple items if I were able to get a ListView to behave as described above. - Thanks!