Results 1 to 4 of 4

Thread: Setting panel selected item

  1. #1
    Join Date
    Feb 2009
    Posts
    427

    Default Setting panel selected item

    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?

  2. #2
    Join Date
    Jul 2008
    Posts
    61

    Default

    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.

  3. #3
    Join Date
    Feb 2009
    Posts
    427

    Default

    hrm... It seems to be working (consistently selecting an item), but 0 is selecting the 2nd item in the panel.

  4. #4
    Join Date
    Feb 2009
    Posts
    427

    Default

    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:
    Code:
    <onright>SetFocus(1201, 0)</onright>
    Code:
    <onright><![CDATA[CallPython(
    nextlist = mc.GetActiveWindow().GetList(1201)
    nextlist.SetFocusedItem(0)
    nextlist.SetFocus()
    )]]></onright>
    The first code snippet has the problem, but the second functions correctly selecting the top item in the list.

Similar Threads

  1. How to get the ListIndex of a selected item?
    By Severus in forum boxee applications
    Replies: 5
    Last Post: October 28th, 2011, 02:44 PM
  2. Wrap + Panel combained?
    By jeltz in forum boxee applications
    Replies: 0
    Last Post: December 7th, 2010, 07:29 AM
  3. Get selected list item from button in media action dialog
    By Brucmack in forum boxee applications
    Replies: 3
    Last Post: November 21st, 2010, 07:45 AM
  4. Forget selected item...
    By xmcnuggetx in forum boxee applications
    Replies: 1
    Last Post: May 11th, 2009, 03:39 PM
  5. (Library) Selected item is hidden
    By iBeech in forum bugs? what bugs?
    Replies: 1
    Last Post: December 29th, 2008, 06:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •