AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

LVA: Color individual cells of a ListView, and more ...
Goto page Previous  1, 2, 3  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Tue Aug 11, 2009 10:22 am    Post subject: Reply with quote

Hi.

First of all, very nice work. I added it to the list of Gui related scripts.



One problem, tho, very serious: when you resize column, script blocks and burns CPU. Thats something I often encounter when implementing custom controls and its always about message monitoring (subclass, onmessage....).

You have 2 places where that happens: OnNotify and LV Scrolling and both may crash the AHK. Keep in mind that it can be more or less problematic on any particular computer, you maybe never encountered it so far. On my PC, each time I move column, it crashes (Vista, Quad Core).


Adding critical 500 to mentioned functions seem to solve the problem. I am not yet sure if it rly solves it, but it will definitelly work better. In my work sometimes even that doesn't help much.
_________________
Back to top
View user's profile Send private message
Arnaud
Guest





PostPosted: Tue Sep 08, 2009 5:57 am    Post subject: Reply with quote

when using it, having my content of listview sometimes totally disappear and my script hang out.

There is about 1400+ line in the listview and problem is totally random.

any idea ?
I think i have got 1 time theproblem when not using LVA too ... Smile but wasn't sure. Anyway without LVA i don't think having listview bug
Back to top
storm91



Joined: 08 Sep 2009
Posts: 10

PostPosted: Tue Sep 08, 2009 9:43 pm    Post subject: Reply with quote

Using demo script just scroll faslty the listview will make the list bug randomly
Back to top
View user's profile Send private message
pajenn



Joined: 07 Feb 2009
Posts: 384

PostPosted: Wed Sep 09, 2009 2:50 pm    Post subject: Reply with quote

thanks for the script. i hope it will be updated.

anyone know if similar methods could modify individual TreeView branch colors?

I'm insufficiently fluent in AHK to write a script like this myself, but I may try to convert the original, or the one by evl this script was based on, into a treeview version; but it would be trial and error stuff...
_________________
Hardware: 1.8 GHz laptop with 4 GB ram, Windows XP/SP3
Software: Prevx, Privatefirewall, KeyScrambler.
Back to top
View user's profile Send private message
storm91



Joined: 08 Sep 2009
Posts: 10

PostPosted: Wed Sep 09, 2009 3:48 pm    Post subject: Reply with quote

well this script is excellent, however i haven't the skills yet for fix it.

I think the problem is on the event handler or the way it's done.
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Sat Sep 12, 2009 9:09 am    Post subject: Reply with quote

You should all try what I described above. It should solve the problem.
_________________
Back to top
View user's profile Send private message
storm91



Joined: 08 Sep 2009
Posts: 10

PostPosted: Sun Sep 13, 2009 12:34 am    Post subject: Reply with quote

i have add critical 500 :
Critical 500
OnMessage("0x4E", "LVA_OnNotify")

Don't seems fix problem for me.
When application freeze, if i click on trail icon, it's continue a bit to unfreeze the scrolling (but not totally)
Back to top
View user's profile Send private message
trueski



Joined: 08 Apr 2008
Posts: 92
Location: Minnesota, USA

PostPosted: Mon Oct 12, 2009 9:34 pm    Post subject: another problem Reply with quote

Another problem:
This script works great, but after generating so many rows it will stop coloring them..
_________________
-trueski-
Back to top
View user's profile Send private message
storm91



Joined: 08 Sep 2009
Posts: 10

PostPosted: Mon Jan 04, 2010 11:43 pm    Post subject: Reply with quote

storm91 wrote:
i have add critical 500 :
Critical 500
OnMessage("0x4E", "LVA_OnNotify")

Don't seems fix problem for me.
When application freeze, if i click on trail icon, it's continue a bit to unfreeze the scrolling (but not totally)


anyone have idea how to fix it ?
Back to top
View user's profile Send private message
adamrgolf



Joined: 28 Dec 2006
Posts: 440

PostPosted: Fri Feb 19, 2010 1:34 pm    Post subject: Reply with quote

Any way to adjust this to show text in a cell with a progress bar? If not regular listview text then possibly custom text through gdi?
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Fri Feb 19, 2010 5:00 pm    Post subject: Reply with quote

To fix freezing bug you can also try this:

1. Remove subclassing. Put return in lva_Subclass function as first line.
2. Put critical 500, in lva_OnNotify function.
_________________
Back to top
View user's profile Send private message
ApertureLabs
Guest





PostPosted: Thu May 20, 2010 8:29 pm    Post subject: Reply with quote

Sorry for the bump, but I need some help here.

I'm using LVA to highlight a cell in a Listview, like in Excel. A user can navigate with the arrow keys and enter data into certain cells.

The problem I'm having is that the listview is on a second gui. When you destroy and reopen the Gui, I run into both lagginess and a redrawing problem. Does LVA not handle a destroyed and recreated Listview?

I'm calling LVA_ListViewAdd and OnMessage("0x4E", "LVA_OnNotify") whenever I create (and recreate) the listview. Could this be the problem too? If so, which should I only call once?

Thanks.
Back to top
guest3456
Guest





PostPosted: Fri May 21, 2010 12:17 pm    Post subject: Re: LVA: Color individual cells of a ListView, and more ... Reply with quote

dadepp wrote:

Things to Do:
- Implement an editcontrol to be shown to edit individual cells
- same as above, but with a dropdownbox


has this been implemented? are there any other controls that have done this?

i know i've seen some other IDEs that use these controls, maybe the Visual Basic platform where they use one of these controls which handles all the settings of a particular control or something. i want one of these for my app
Back to top
guest3456
Guest





PostPosted: Fri May 21, 2010 12:19 pm    Post subject: Re: LVA: Color individual cells of a ListView, and more ... Reply with quote

guest3456 wrote:
dadepp wrote:

Things to Do:
- Implement an editcontrol to be shown to edit individual cells
- same as above, but with a dropdownbox


has this been implemented? are there any other controls that have done this?

i know i've seen some other IDEs that use these controls, maybe the Visual Basic platform where they use one of these controls which handles all the settings of a particular control or something. i want one of these for my app


for example, this properties box in the image below, you can click the cells and edit them or get a dropdown, etc

http://www.cs.trinity.edu/~thicks/Tutorials/Visual-Studio-Windows-App-Basic-Form/New.ht30.jpg
Back to top
ribbs2521



Joined: 28 Sep 2007
Posts: 273
Location: New York

PostPosted: Fri May 21, 2010 3:04 pm    Post subject: Reply with quote

I tried, but of course failed, it seemed simple but apparently not for my elementary abilities. Is it possible that someone could develop a function to draw a line through the cell to create a strike through look?

I tried to mess with the progress bar function to draw a line instead of a rectangle, place it centered in the cell and blah blah blah but I just don't quite understand the full functionality of the code yet.

If no one else does it I'll be continuing to try and figure this code out since it will help me learn anyway. If I ever get it I'll post my attempt at it lol.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group