GaryFrost Posted December 18, 2006 Author Share Posted December 18, 2006 Found a type-o, so when moving an item after it's been moved at least once causes it not to delete Replace: _GUICtrlListViewDeleteItem($ListView, $From_index) oÝ÷ Ùh«¢+Ø($%}U% Ñɱ1¥ÍÑY¥Ý±Ñ%Ñ´ ÀÌØí¡}1¥ÍÑY¥Ü°ÀÌØíɽµ}¥¹à¤ SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
ReFran Posted May 15, 2007 Share Posted May 15, 2007 I don't get it to work. Latest Beta, WinXP. Any idea? Reinhard C:\LV_Test.au3(41,26) : ERROR: $LVI_MASK previously declared as a 'Const' Global Enum $LVI_MASK = 1, ~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(41,38) : ERROR: $LVI_IITEM previously declared as a 'Const' Global Enum $LVI_MASK = 1, $LVI_IITEM, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(41,53) : ERROR: $LVI_ISUBITEM previously declared as a 'Const' Global Enum $LVI_MASK = 1, $LVI_IITEM, $LVI_ISUBITEM, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(41,65) : ERROR: $LVI_STATE previously declared as a 'Const' Global Enum $LVI_MASK = 1, $LVI_IITEM, $LVI_ISUBITEM, $LVI_STATE, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(41,81) : ERROR: $LVI_STATEMASK previously declared as a 'Const' Global Enum $LVI_MASK = 1, $LVI_IITEM, $LVI_ISUBITEM, $LVI_STATE, $LVI_STATEMASK, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(41,95) : ERROR: $LVI_PSZTEXT previously declared as a 'Const' Global Enum $LVI_MASK = 1, $LVI_IITEM, $LVI_ISUBITEM, $LVI_STATE, $LVI_STATEMASK, $LVI_PSZTEXT, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(42,18) : ERROR: $LVI_CCHTEXTMAX previously declared as a 'Const' $LVI_CCHTEXTMAX, ~~~~~~~~~~~~~~~^ C:\LV_Test.au3(42,31) : ERROR: $LVI_IIMAGE previously declared as a 'Const' $LVI_CCHTEXTMAX, $LVI_IIMAGE, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(42,44) : ERROR: $LVI_LPARAM previously declared as a 'Const' $LVI_CCHTEXTMAX, $LVI_IIMAGE, $LVI_LPARAM, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(42,58) : ERROR: $LVI_IINDENT previously declared as a 'Const' $LVI_CCHTEXTMAX, $LVI_IIMAGE, $LVI_LPARAM, $LVI_IINDENT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3 - 10 error(s), 0 warning(s) Link to comment Share on other sites More sharing options...
GaryFrost Posted May 15, 2007 Author Share Posted May 15, 2007 I don't get it to work. Latest Beta, WinXP. Any idea? Reinhard C:\LV_Test.au3(41,26) : ERROR: $LVI_MASK previously declared as a 'Const' Global Enum $LVI_MASK = 1, ~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(41,38) : ERROR: $LVI_IITEM previously declared as a 'Const' Global Enum $LVI_MASK = 1, $LVI_IITEM, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(41,53) : ERROR: $LVI_ISUBITEM previously declared as a 'Const' Global Enum $LVI_MASK = 1, $LVI_IITEM, $LVI_ISUBITEM, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(41,65) : ERROR: $LVI_STATE previously declared as a 'Const' Global Enum $LVI_MASK = 1, $LVI_IITEM, $LVI_ISUBITEM, $LVI_STATE, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(41,81) : ERROR: $LVI_STATEMASK previously declared as a 'Const' Global Enum $LVI_MASK = 1, $LVI_IITEM, $LVI_ISUBITEM, $LVI_STATE, $LVI_STATEMASK, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(41,95) : ERROR: $LVI_PSZTEXT previously declared as a 'Const' Global Enum $LVI_MASK = 1, $LVI_IITEM, $LVI_ISUBITEM, $LVI_STATE, $LVI_STATEMASK, $LVI_PSZTEXT, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(42,18) : ERROR: $LVI_CCHTEXTMAX previously declared as a 'Const' $LVI_CCHTEXTMAX, ~~~~~~~~~~~~~~~^ C:\LV_Test.au3(42,31) : ERROR: $LVI_IIMAGE previously declared as a 'Const' $LVI_CCHTEXTMAX, $LVI_IIMAGE, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(42,44) : ERROR: $LVI_LPARAM previously declared as a 'Const' $LVI_CCHTEXTMAX, $LVI_IIMAGE, $LVI_LPARAM, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3(42,58) : ERROR: $LVI_IINDENT previously declared as a 'Const' $LVI_CCHTEXTMAX, $LVI_IIMAGE, $LVI_LPARAM, $LVI_IINDENT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\LV_Test.au3 - 10 error(s), 0 warning(s) Comment out that line and it should work. Its old code, the include files have changed since then and currently have that already declared. Gary SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
ReFran Posted May 16, 2007 Share Posted May 16, 2007 Comment out that line .....Got it, only line 41+42 have to be commented out. Looks real professional.Is it poosible to get it autoscroll if I have more than 9 LV-Items and want to drag somewhere to the end. For example 20 LV-Items (in SciptLine 74).Thanks (in advance) Reinhard Link to comment Share on other sites More sharing options...
James Posted May 16, 2007 Share Posted May 16, 2007 Wow this is awesome. I havent used it only this example. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
GaryFrost Posted May 17, 2007 Author Share Posted May 17, 2007 Got it, only line 41+42 have to be commented out. Looks real professional.Is it poosible to get it autoscroll if I have more than 9 LV-Items and want to drag somewhere to the end. For example 20 LV-Items (in SciptLine 74).Thanks (in advance) ReinhardUpdated 1st post, give it a try. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
ReFran Posted May 17, 2007 Share Posted May 17, 2007 Updated 1st post, give it a try. Hi Gary, I like your short statements and quick response. It works good so far, but there seems to be a probleme with the mouse shadow (or screen update) If I drag down (9->20) it leaves the mouse shadow from item [+] 9 .. at the top of the downscrolled LV (somwhere at 11). If I drag then up (18->5) and LV-box scrolls up, the upper listview items become unreadable (much mouse shadows cause this I think). The LV can then be updated with scrolling up and down. Howerever it shows that it can be done. I have to look deeper in it to understand - at least a little bit - how it works. Thanks for all your work on this item. Reinhard Link to comment Share on other sites More sharing options...
GaryFrost Posted May 17, 2007 Author Share Posted May 17, 2007 Hi Gary, I like your short statements and quick response. It works good so far, but there seems to be a probleme with the mouse shadow (or screen update) If I drag down (9->20) it leaves the mouse shadow from item [+] 9 .. at the top of the downscrolled LV (somwhere at 11). If I drag then up (18->5) and LV-box scrolls up, the upper listview items become unreadable (much mouse shadows cause this I think). The LV can then be updated with scrolling up and down. Howerever it shows that it can be done. I have to look deeper in it to understand - at least a little bit - how it works. Thanks for all your work on this item. Reinhard I mentioned this in the 1st post, just haven't had time to look into it. Added: auto scrolling when dragging (quick and dirty, might be a better way to do this. Note: this causes a repaint problem) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
ReFran Posted May 17, 2007 Share Posted May 17, 2007 "I mentioned this in the 1st post ...................." Yeaaa, sometimes reading helps a lot. " .... just haven't had time to look into it." My LV works fine with up/down buttons. Dragging would only be a highlight. So there is nothing to do urgent. best regards, Reinhard Link to comment Share on other sites More sharing options...
ReFran Posted June 29, 2007 Share Posted June 29, 2007 (edited) " .... auto scrolling when dragging (quick and dirty, might be a better way to do this. Note: this causes a repaint problem)" Got it. At least a good working example. On dragingstart I use: DllCall("ComCtl32.dll", "int", "ImageList_EndDrag") to switch out the draging mouse image - which cause the problems if scrolled up - and attach a tooltip with the listviewitem text to the mouse. That looks good/professional and works perfect. I have to think about a tooltip Icon to attach ;-). Another way would be to switch out in front of "_GUICtrlListViewScroll" and on after that, but untested and may tend to flicker. By the way a good and simple replacement for "_GUICtrlListViewScroll" is MouseWheel("up"/"down"). In the start I want to switch Cursur ID from arrow to "grabbing hand", which is not posible with "GUISetCursor(..)". If you know a way to do it by a DllCall it would be fine if you can state it here. Thanks for all your help, Reinhard Edited June 29, 2007 by ReFran Link to comment Share on other sites More sharing options...
GaryFrost Posted June 29, 2007 Author Share Posted June 29, 2007 (edited) " .... auto scrolling when dragging (quick and dirty, might be a better way to do this. Note: this causes a repaint problem)"Got it. At least a good working example.On dragingstart I use: DllCall("ComCtl32.dll", "int", "ImageList_EndDrag")to switch out the draging mouse image - which cause the problems if scrolled up - and attach a tooltip with the listviewitem text to the mouse. That looks good/professional and works perfect. I have to think about a tooltip Icon to attach ;-).Another way would be to switch out in front of "_GUICtrlListViewScroll" and on after that, but untested and may tend to flicker.By the way a good and simple replacement for "_GUICtrlListViewScroll" is MouseWheel("up"/"down").In the start I want to switch Cursur ID from arrow to "grabbing hand", which is not posible with "GUISetCursor(..)".If you know a way to do it by a DllCall it would be fine if you can state it here.Thanks for all your help, ReinhardI would be carefull using MouseWheel, your assuming the ListView has the focus.Also found out that if you use the Built-in ListView then there is the repain problem in using the DragImage, didn't see that problem with Creating your own ListView. Edited June 29, 2007 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
ReFran Posted June 29, 2007 Share Posted June 29, 2007 (edited) "....... I would be carefull using MouseWheel, your assuming the ListView has the focus." Will pay attention to that. "...... didn't see that problem with Creating your own ListView." Perhaps in my next project. At time, the tooltip solution looks professional enough. Best regards, Reinhard Edited June 29, 2007 by ReFran Link to comment Share on other sites More sharing options...
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