Adding icons to a Listview object 
Author Message
 Adding icons to a Listview object

I have 3 listview controls in a form, and I'm adding items to each one, 5
in the first, 4 in the second and nine in the third.

All Listviews have the same properties. The icons in the first are aligned
as icons do in, for example explorer - aligned to the left of the listview.

In the second listview, the icons are centered in the box and are closer
together than the first listview's icons.

Even worse, in the third, the icons are over to the right of the box, and
cause a horizontal scroll bar to appear.

How to I specify the postion of the icons, and the space between them ?

Thanks in advance.




Wed, 18 Jun 1902 08:00:00 GMT  
 Adding icons to a Listview object
Hi there,

Quote:
> All Listviews have the same properties.

Maybe you could try making a Control Array of your listview objects
(based on the one which seems to be working as you'd like it to)...this
would be a fairly sure way of making sure that all of the properties
were indeed the same.  If the ListView objects still don't behave the
way you'd like them to after doing this...I'm not sure what the problem
is!  If it worked OK, and you didn't want them as an array, then just
change the names.

(I haven't used this object myself B4, BTW)

rd



Wed, 18 Jun 1902 08:00:00 GMT  
 Adding icons to a Listview object
Thanks for the suggestion, but I figured out what is was. I moved the icons
from a listview which didn't display them correctly to the one that did,
and the same thing happened - all icons over to the left causing a scroll
bar to appear.

I just happened to notice that the icon text was a bit longer, so I
shortenend the text in all icons and hey presto !
I still don't know why the icon text length should affect their position in
ther listview.

The other thing I noticed was that making the listview unsorted made the
icon spacing *much* bigger than when it was sorted - another of the
listview control's "features"...

Iain Marshall   it.glasgow.gov.uk



Quote:
> Hi there,

> > All Listviews have the same properties.

> Maybe you could try making a Control Array of your listview objects
> (based on the one which seems to be working as you'd like it to)...this
> would be a fairly sure way of making sure that all of the properties
> were indeed the same.  If the ListView objects still don't behave the
> way you'd like them to after doing this...I'm not sure what the problem
> is!  If it worked OK, and you didn't want them as an array, then just
> change the names.

> (I haven't used this object myself B4, BTW)

> rd



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Adding icons to ListView boxes

2. Adding Icons to ListView

3. Adding Icons to ListView

4. Adding different icons to the ListView subitems

5. Add icons into Listview control

6. Add icons to ListView control

7. ListView - Editing a label as an icon is added

8. adding icons from dll to listview/imagelist

9. listview object moving icons

10. MouseMove event in ListView does not trigger when ListView in Small/Large Icon View mode

11. ? Collection add object -> usercontrol add control

12. ? Collection add object -> usercontrol add control

 

 
Powered by phpBB® Forum Software