Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

TListItem (ListView) member StateIndex cannot exceed 15 when linked to TImageList ?

Posted on 2000-04-30
4
538 Views
Last Modified: 2010-04-04
Howdy,

Using Borland cpp Builder 4.x

I use a ListView and have assigned an ImageList to the StateImages property.

So I can use e.g. :
ListItem->StateIndex = 5 ;
And icon 5 from the ImageList will be displayed next to the ListItem's normal icon.

This all works nicely untill value 14 !!
When I want to display icon 15 (or higher) I cannot seem to get the above mentioned mechanism to work !??????

Am I missing someting, Should I set another property ... ??

Help greatly appreciated !!
0
Comment
Question by:sneeuw
  • 2
  • 2
4 Comments
 
LVL 20

Expert Comment

by:Madshi
ID: 2765422
There's a limitation in the ListView component, not in Delphi's or BCB's component wrapper, but in Windows' ListView control itself.
StateImages are only thought to show up different states, normally you don't have more than 2 or 3 of these.
You should use the SmallImages instead.

Regards, Madshi.
0
 

Author Comment

by:sneeuw
ID: 2765847
Damn Windows

I manage all icons in one ImageList and link all icon members to this one ImageList.
So SmallImages, StatImages, ... all link to the one ImageList.
So what you're saying is I should create another ImageList and manage the StateImages seperately ?
0
 
LVL 20

Accepted Solution

by:
Madshi earned 50 total points
ID: 2765885
Yes! Or put the state images to the beginning of the one ImageList. That should work, too. But you'll never be able to use more than 14 (or whatever) state images in one ListView. I hope you don't need that.
0
 

Author Comment

by:sneeuw
ID: 2767563
OK Thanks !
I'll try it out !
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question