ListView Item position 
Author Message
 ListView Item position

Hi,

This may not be the best place to post this, but here goes...
We have a ListView in icon mode, with an associated ImageList. To make
the layout look better, we are setting the position for each item. For a
range of values (on my machine ), the number that we set isn't the one that
comes back from the control...

For i = 0 To 65536
        itemX.Left = i
        If itemX.Left <> i Then
                Beep        --------> this line actually gets called
        End If
Next

for i from 61440 to 65535 itemX.Left actually equals i-65536

Can anyone shed any light on this? Using win2k

Thanks Simon



Fri, 26 Nov 2004 16:06:21 GMT  
 ListView Item position


Quote:
>Hi,

>This may not be the best place to post this, but here goes...
>We have a ListView in icon mode, with an associated ImageList. To make
>the layout look better, we are setting the position for each item. For a
>range of values (on my machine ), the number that we set isn't the one that
>comes back from the control...

>For i = 0 To 65536
>            itemX.Left = i
>            If itemX.Left <> i Then
>            Beep        --------> this line actually gets called
>            End If
>Next

>for i from 61440 to 65535 itemX.Left actually equals i-65536

>Can anyone shed any light on this? Using win2k

>Thanks Simon

Is it your data type?
65535 is &HFFFF which I think is the max for an unsigned integer.

--
Jeff Gaines Damerham Hampshire UK



Fri, 26 Nov 2004 18:33:17 GMT  
 ListView Item position


Quote:
> Is it your data type?
> 65535 is &HFFFF which I think is the max for an unsigned integer.

No, I've tried all sorts of data types (they all get converted at the
window message level to long anyway)...

Thanks
Simon



Sat, 27 Nov 2004 13:56:32 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Drag an item of Listview to another position of the same ListView

2. ListView: How to get item position?

3. ListView: How to get item position

4. Position Selected Item in a ListView at the top

5. How to get position of ListView item??

6. jump listview to the hilight item (selected item)...

7. Any Way To Stop All ListView Items From Blinking While Adding Items

8. Listview: check if an item in current listview

9. changing the background of a listview item in the listview control

10. Listview Control - moving items from one listview to another

11. Listview - Changing color of listview items

12. Positioning attachments in mail items

 

 
Powered by phpBB® Forum Software