ListView items remain indented after removing icons 
Author Message
 ListView items remain indented after removing icons

Hello!

I'm using a ListView where the user can select to display some info as
icons.
The ListView is in Report mode.

When the icons are turned on (an ImageList is associated with the SmallIcons
property) the items are automatically indented to make room for the icons.
Fine.
When I want the icons to be turned off I set the SmallIcons property to
Nothing. The items remain indented.
I've tried to solve the problem by clearing the ListView.ListItems and
adding the items again (without an ImageList index), but the indentation
remains.

Any help is greatly appreciated, because this is really driving me nuts...

/John



Sun, 28 Mar 2004 05:01:49 GMT  
 ListView items remain indented after removing icons
John,

 You will have to set each of the Icon Image Lists on the ListView's
Image Lists tab to "<none>" at design time. This property cannot be
modified at run time.

Rob

Quote:

> Hello!

> I'm using a ListView where the user can select to display some info as
> icons.
> The ListView is in Report mode.

> When the icons are turned on (an ImageList is associated with the SmallIcons
> property) the items are automatically indented to make room for the icons.
> Fine.
> When I want the icons to be turned off I set the SmallIcons property to
> Nothing. The items remain indented.
> I've tried to solve the problem by clearing the ListView.ListItems and
> adding the items again (without an ImageList index), but the indentation
> remains.

> Any help is greatly appreciated, because this is really driving me nuts...

> /John



Sun, 28 Mar 2004 20:56:11 GMT  
 ListView items remain indented after removing icons
It's read-write at run time too...


Quote:
> John,

>  You will have to set each of the Icon Image Lists on the ListView's
> Image Lists tab to "<none>" at design time. This property cannot be
> modified at run time.

> Rob



Quote:
> > Hello!

> > I'm using a ListView where the user can select to display some info as
> > icons.
> > The ListView is in Report mode.

> > When the icons are turned on (an ImageList is associated with the
SmallIcons
> > property) the items are automatically indented to make room for the
icons.
> > Fine.
> > When I want the icons to be turned off I set the SmallIcons property to
> > Nothing. The items remain indented.
> > I've tried to solve the problem by clearing the ListView.ListItems and
> > adding the items again (without an ImageList index), but the indentation
> > remains.

> > Any help is greatly appreciated, because this is really driving me
nuts...

> > /John



Mon, 29 Mar 2004 00:21:12 GMT  
 ListView items remain indented after removing icons
I'm sorry that I wasn't that detailed in my first posting, but I can make
the icons disappear alright. The problem is that the list items don't move
back to the left border of the control. The space once occupied by the icons
still remains, but empty.


Quote:
> It's read-write at run time too...



> > John,

> >  You will have to set each of the Icon Image Lists on the ListView's
> > Image Lists tab to "<none>" at design time. This property cannot be
> > modified at run time.

> > Rob


> > > Hello!

> > > I'm using a ListView where the user can select to display some info as
> > > icons.
> > > The ListView is in Report mode.

> > > When the icons are turned on (an ImageList is associated with the
> SmallIcons
> > > property) the items are automatically indented to make room for the
> icons.
> > > Fine.
> > > When I want the icons to be turned off I set the SmallIcons property
to
> > > Nothing. The items remain indented.
> > > I've tried to solve the problem by clearing the ListView.ListItems and
> > > adding the items again (without an ImageList index), but the
indentation
> > > remains.

> > > Any help is greatly appreciated, because this is really driving me
> nuts...

> > > /John



Mon, 29 Mar 2004 05:57:37 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How to remove Icon from ListView Item?

2. How to remove Icon from ListView Item?

3. Listview Icons Indented

4. ListView Control - Removing selected items from the list

5. Removing an item from a listview

6. Removing an item from a ListView

7. help adding and removing items from a listview

8. how can i remove program item icons?

9. Q: How to get rid of ListView flicker when adding/removing items

10. SHFileOp and removing corresponding items from ListView

11. removing items from a listview

12. Remove Selected item in ListView Control

 

 
Powered by phpBB® Forum Software