Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

LVA: Color individual cells of a ListView, and more ...


  • Please log in to reply
41 replies to this topic
majkinetor
  • Moderators
  • 4512 posts
  • Last active: Jul 29 2016 12:40 AM
  • Joined: 24 May 2006
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.
Posted Image

Arnaud
  • Guests
  • Last active:
  • Joined: --
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 ... :) but wasn't sure. Anyway without LVA i don't think having listview bug

storm91
  • Members
  • 10 posts
  • Last active: Nov 25 2009 04:31 AM
  • Joined: 08 Sep 2009
Using demo script just scroll faslty the listview will make the list bug randomly

pajenn
  • Members
  • 391 posts
  • Last active: Feb 06 2015 07:57 AM
  • Joined: 07 Feb 2009
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: fast laptop with SSD
Software: Win 7 Home Premium 64-bit, android for phone and tablet


storm91
  • Members
  • 10 posts
  • Last active: Nov 25 2009 04:31 AM
  • Joined: 08 Sep 2009
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.

majkinetor
  • Moderators
  • 4512 posts
  • Last active: Jul 29 2016 12:40 AM
  • Joined: 24 May 2006
You should all try what I described above. It should solve the problem.
Posted Image

storm91
  • Members
  • 10 posts
  • Last active: Nov 25 2009 04:31 AM
  • Joined: 08 Sep 2009
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)

trueski
  • Members
  • 121 posts
  • Last active: Jun 25 2014 09:12 PM
  • Joined: 08 Apr 2008
Another problem:
This script works great, but after generating so many rows it will stop coloring them..
-trueski-

storm91
  • Members
  • 10 posts
  • Last active: Nov 25 2009 04:31 AM
  • Joined: 08 Sep 2009

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 ?

adamrgolf
  • Members
  • 442 posts
  • Last active: May 22 2017 09:16 PM
  • Joined: 28 Dec 2006
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?

majkinetor
  • Moderators
  • 4512 posts
  • Last active: Jul 29 2016 12:40 AM
  • Joined: 24 May 2006
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.
Posted Image

ApertureLabs
  • Guests
  • Last active:
  • Joined: --
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.

guest3456
  • Guests
  • Last active:
  • Joined: --

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

guest3456
  • Guests
  • Last active:
  • Joined: --

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.trinit... ... w.ht30.jpg

ribbs2521
  • Members
  • 279 posts
  • Last active: Feb 23 2012 05:58 PM
  • Joined: 28 Sep 2007
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.