Listitem.Position does work after all.  I hadn't tried it due to the
documentation.  Checking the code, reading the Position is fine for vsReport
items but setting the Position is only supported for vsSmallIcon & vsIcon.
The doc isn't clear in that respect.

Ross.

-----Original Message-----
From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On
Behalf Of Jolyon Smith
Sent: Tuesday, 8 March 2011 4:06 PM
To: 'NZ Borland Developers Group - Delphi List'
Subject: Re: [DUG] Move mouse to ListItem

I wonder if the issue discussed in this thread might be relevant:

http://social.msdn.microsoft.com/Forums/en-CA/vcgeneral/thread/ff2381fd-2783
-431e-ba86-ccdf269d7722


(LVM_GetItemPosition can be broken in report/list view on Vista/Win7
depending on manifest.  TListItem.Position uses LVM_GetItemPosition, rather
than GetItemRect)


-----Original Message-----
From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On
Behalf Of David O'Brien
Sent: Tuesday, 8 March 2011 15:48
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Move mouse to ListItem

I'm using 2009...

-----Original Message-----
From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz]
On Behalf Of Ross Levis
Sent: Tuesday, 8 March 2011 2:08 p.m.
To: 'NZ Borland Developers Group - Delphi List'
Subject: Re: [DUG] Move mouse to ListItem

I did mean vsReport.  Perhaps this was changed in later Delphi versions.
My
D7 documentation says.

"Note: Position has no effect unless the list view has a ViewStyle of
vsIcon or vsSmallIcon."

But I'll try it.

Cheers.

-----Original Message-----
From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz]
On Behalf Of David O'Brien
Sent: Tuesday, 8 March 2011 8:51 AM
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Move mouse to ListItem

ListView.Items[i].GetPosition appears to work in vsReport view, or are
we talking another view?

-----Original Message-----
From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz]
On Behalf Of Ross Levis
Sent: Monday, 7 March 2011 6:49 p.m.
To: 'NZ Borland Developers Group - Delphi List'
Subject: Re: [DUG] Move mouse to ListItem

This doesn't work in detailed view which I'm using.

Cheers.

-----Original Message-----
From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz]
On Behalf Of David O'Brien
Sent: Monday, 7 March 2011 12:56 PM
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Move mouse to ListItem

ListView.Selected.GetPosition? Returns a TPoint.

-----Original Message-----
From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz]
On Behalf Of Ross Levis
Sent: Friday, 4 March 2011 5:16 p.m.
To: 'NZ Borland Developers Group - Delphi List'
Subject: Re: [DUG] Move mouse to ListItem

I plan to use that function, but need the x,y of the selected list item
first.

Jolyon's suggestion of ListView_GetItemRect looks to be heading in the
right direction.

Cheers.
 
-----Original Message-----
From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz]
On Behalf Of Todd
Sent: Friday, 4 March 2011 5:03 PM
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Move mouse to ListItem


Pos := Control.ScreenToClient(Mouse.CursorPos);


> On a keyboard shortcut I want to move the mouse to the start of the 
> currently selected item in a listview.  I know how to move the mouse 
> but
I'm
> not sure how to get the x,y position of the selected item in relation 
> to
the
> listview.  Any ideas?
> 
>  
> 
> Cheers.
> 
> 
> 
> 
> 
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi@delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-requ...@delphi.org.nz with
Subject:
unsubscribe

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
unsubscribe


_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
unsubscribe

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
unsubscribe


_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
unsubscribe

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
unsubscribe


_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
unsubscribe

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
unsubscribe

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject:
unsubscribe


_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Reply via email to