NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 21 22 23 24 25 … 93 Next »
Set focus to list

 
  • 0 Vote(s) - 0 Average
Set focus to list
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#1
2009-12-09, 01:44 PM
I have a BaseButtonListUiTask based plugin. I'd like to programmatically set the focus to the list control when the user selects one of the buttons. Is this possible?
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#2
2009-12-09, 03:14 PM
In your handle command function, put a base.OnKeyDown().

Code:
protected override void handleCommand(string command)
        {
            switch (command)
            {
               [B][color=seagreen] // We don't want to move focus to the list on this.[/color][/B]
                case "Main Menu":
                    base.handleCommand(command);
                    break;
                [B][color=SeaGreen]// After changing the view mode, we want to set focus back to the list.[/color][/B]
                case "Mode":
                    switch (uiList.getViewMode())
                    {
                        case UiList.ViewMode.MODE_FILMSTRIP:
                            uiList.setViewMode(UiList.ViewMode.MODE_LIST);
                            break;
                        case UiList.ViewMode.MODE_LIST:
                            uiList.setViewMode(UiList.ViewMode.MODE_DETAILS);
                            break;
                        case UiList.ViewMode.MODE_DETAILS:
                            uiList.setViewMode(UiList.ViewMode.MODE_ICON);
                            break;
                        case UiList.ViewMode.MODE_ICON:
                            uiList.setViewMode(UiList.ViewMode.MODE_FILMSTRIP);
                            break;
                    }
                   [color=Red][B] base.OnKeyDown(new System.Windows.Forms.KeyEventArgs(System.Windows.Forms.Keys.Right));[/B][/color]
                    break;
            }
            
        }
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#3
2009-12-09, 03:15 PM
You should probably verify that the list has items first though.
InVermont
Offline

Member

Posts: 157
Threads: 10
Joined: Mar 2007
#4
2009-12-09, 03:52 PM
base.currentGroupSelection = ControlGroupSelection.Content;
base.uiList.suggestSelectionIndex(0);

should also work. I use the above so it won't matter if the UiList had focus already.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#5
2009-12-09, 07:54 PM
Ah yeah. I forgot about the currentgroupselection.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Channels List by Channel Group Name scJohn 1 2,824 2018-01-05, 10:45 PM
Last Post: mvallevand
  Channel List (native controller) psycik 2 3,161 2017-06-19, 09:14 AM
Last Post: psycik
  List of "IEventNotification" events? reven 8 3,540 2012-11-01, 10:56 PM
Last Post: reven
  Building a list of files in media folders (npvr Music and Videos) bgowland 2 1,938 2012-02-05, 10:29 AM
Last Post: bgowland
  Update NewSyleListPlugin Button list dynamically? psycik 2 1,817 2011-12-22, 12:25 AM
Last Post: mvallevand
  Single row horizontal list in popup? cncb 4 2,262 2011-09-28, 09:48 PM
Last Post: cncb
  Focus imilne 6 2,618 2011-07-16, 09:37 AM
Last Post: imilne
  A list of changing images McBainUK 1 1,895 2011-06-21, 04:36 PM
Last Post: sub
  Multiple views for a single list imilne 18 5,757 2011-04-22, 11:06 PM
Last Post: sub
  Skin question - how to centre a list UiList control on screen? McBainUK 2 1,909 2011-02-17, 08:46 AM
Last Post: McBainUK

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode