View Full Version : Setting panel selected item
May 11th, 2009, 09:06 AM
Is there a way to set the selection to the 1st item when the panel receives focus instead of remembering where the user was last?
May 11th, 2009, 09:17 AM
yes, in the <onup/ondown/onright/onleft> put this <onright>SetFocus(100, 0)</onright>
where 0 is the position in the list you want to set focus on.
May 11th, 2009, 09:32 AM
hrm... It seems to be working (consistently selecting an item), but 0 is selecting the 2nd item in the panel.
May 14th, 2009, 10:09 AM
Something seems funny with the SetFocus(id,index)... (I'm on the Windows build incase its an os build issue). If I do SetFocus(1100, 0) it selects the second item in the list not the first, doing SetFocus(1100,1) it selects the third item.. like the index's are 1 off. Take these examples:
nextlist = mc.GetActiveWindow().GetList(1201)
The first code snippet has the problem, but the second functions correctly selecting the top item in the list.
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.