What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Thx!] PlusWnd1.LstView_SetSelectedState()

[Thx!] PlusWnd1.LstView_SetSelectedState()
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [LittleHelp] PlusWnd1.LstView_SetSelectedState()
It isn't done automatically.

You need to send a message to the listview to let the list jump to the item so it is visible.

This can done by sending the windows message constant LVM_ENSUREVISIBLE to the listview.

where the two parameters are:
- i: The index of the list-view item.
- fPartialOK: A value specifying whether the item must be entirely visible. If this parameter is True, no scrolling occurs if the item is at least partially visible.

Thus:
PlusWnd.SendControlMessage(MyControlId, LVM_ENSUREVISIBLE, i, fPartialOK)

eg:
code:
MyWindow.SendControlMessage("MyListViewID", /* LVM_ENSUREVISIBLE */ 0x1013, 5, False)
this makes that the listview with ID "MyListViewID" on the window object MyWindow will make the 6th item (first item is item index 0) entirly visible.

PS: that  '/* something */'  isn't needed, it is just an inline comment to make it clear what the number stands for.

This post was edited on 03-25-2007 at 01:14 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-25-2007 01:09 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Thx!] PlusWnd1.LstView_SetSelectedState() - by Flash on 03-24-2007 at 04:31 PM
RE: [LittleHelp] PlusWnd1.LstView_SetSelectedState() - by CookieRevised on 03-25-2007 at 01:09 AM
RE: [LittleHelp] PlusWnd1.LstView_SetSelectedState() - by Flash on 03-25-2007 at 06:09 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On