Guy_ Posted November 28, 2015 Posted November 28, 2015 (edited) Been using GUICtrlCreateList for the first time in the last few days and am wondering for how many currently perceived shortcomings I am still to blame... Been scanning some of the special settings here and there, but currently still wondering about these...Even "yes" or "no" can be helpful. More is welcome if it saves me some hours 1) When wanting to hilite a List item with the help of GUICtrlSetData ( $myList, data, $hiliteThisItem ), my impression is that this is not case sensitive? If not, can this be set to be so? [solved, if *not* using $LBS_EXTENDEDSEL only?]2) Is it possible to have right-clicking an item also immediately making it the active item (highlight it)...?3) Is manually dragging items for custom sorting possible?4) While using my scroll wheel inside a List, I've been hearing some beeps, as if it wanted to tell me when I got to the edge of either end. However, it does not seem to work consistently and I don't want these sounds anyway. Are they from AutoIt and can I disable them?5) Is it possible to multi-select items? (à la Ctrl-click) [solved with $LBS_EXTENDEDSEL]6) [non-List question] Is it possible that using the Return key inside a GUICtrlCreateInput field activates a Function?Thanks for any tips! Edited November 29, 2015 by Guy_
Zedna Posted November 28, 2015 Posted November 28, 2015 (edited) 5) Is it possible to multi-select items? (à la Ctrl-click) www.autoitscript.com/forum/topic/141202-simple-gui-with-listbox-and-some-functions/page__view__findpost__p__992976EDIT: normal link was broken, so link only in TXT way ... (new cripled forum is really hell :-( ) Edited November 28, 2015 by Zedna Guy_ 1 Resources UDF ResourcesEx UDF AutoIt Forum Search
Guy_ Posted November 29, 2015 Author Posted November 29, 2015 (edited) Thanks & sorry..., there *was* a huge oversight on my part... (5) is kinda solved now by including $LBS_EXTENDEDSELHowever...I had solved (1) by using ...$_idx = _GUICtrlListBox_FindString ($idList, $newItem, 1) ; find item (case sens.) _GUICtrlListBox_SetCurSel(($idList, $_idx)But after adding $LBS_EXTENDEDSEL the above scrollTo & hilite code does not work anymore... (and neither does the 'Default' parameter in GUICtrlSetData)I figured by prepending a "Select none" to the prev. 2 lines it might work again, but it doesn't..._GUICtrlListBox_SelectString ( $idList, "")Is that a known limitation, or do I need to unset something else first...? Edited November 29, 2015 by Guy_
LarsJ Posted November 30, 2015 Posted November 30, 2015 (edited) 2) Yes. in the same manner as point 3) if not in other ways.3) See Drag-and-drop reordering listbox. Note that subclassing is much easier implemented with the four functions SetWindowSubclass, GetWindowSubclass, RemoveWindowSubclass and DefSubclassProc (all implemented in WinAPIShellEx.au3) than with _WinAPI_SetWindowLong.4) I have never heard beeps when I have used the scrool wheel in a listbox. I think it has something to do with your specific code.Have you looked at GUICtrlCreateListView and the GuiListView UDF? A listview is an advanced version of a listbox. Because a listview natively supports more functionality than a listbox most of your questions are easier to implement for a listview than for a listbox. Also the forums contains many more questions/answers and code examples for listviews than for listboxes. GUIListViewEx is a very popular example.6) This can be implemented with GUISetAccelerators. Edited November 30, 2015 by LarsJ Guy_ 1 Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions
Guy_ Posted November 30, 2015 Author Posted November 30, 2015 Thank you Larsj! Very helpful Have you looked at GUICtrlCreateListView and the GuiListView UDF?Just discovered it. When I looked at a Listview example yesterday it reminded me of Excel or _ArrayDisplay() and I was like "No, that's not what I need at the moment." But I will look at the UDF to see if it can be a simple box too. 6) This can be implemented with GUISetAccelerators.I was figuring as much when running across that after my opening post. Good to have confirmation.
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