How to display the virtualkeyboard? (1 Viewer)

weissollo

MP Donator
  • Premium Supporter
  • March 2, 2007
    200
    7
    Franken
    Home Country
    Germany Germany
    Hello Developers,

    at the moment I'm working on a plugin for MP.
    I've tried to use the VirtualKeyboard but It does not work. I've tried the code from the wiki:
    AdvancedPluginDevelopmentTipsAndTricks - MediaPortal Manual Documentation

    It looks like this but the Keyboard will not be shown:
    Code:
            protected override void OnPageLoad()
            {
                VirtualKeyboard keyboard = (VirtualKeyboard)GUIWindowManager.GetWindow    ((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD);
                if (null == keyboard)
                    return;
    
                keyboard.Reset();
                keyboard.Text = League;
                keyboard.DoModal(GetID);
                
                if (keyboard.IsConfirmed)
                {
                    MessageBox.Show(League);
                }
    
    
    
    
            }

    There are some errors in the logfile wich I can't interpret.
    And I'm developing with the 1.0 stable version.
     

    weissollo

    MP Donator
  • Premium Supporter
  • March 2, 2007
    200
    7
    Franken
    Home Country
    Germany Germany
    errrrrrrrrrrrrrrrrrrrrrr,

    found my mistake.
    The right code is

    Code:
            string League;
            public void  Select_League()
            {
                VirtualKeyboard keyboard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD);
                if (null == keyboard)
                    return;
    
                keyboard.Reset();
                keyboard.DoModal(GetID);
                if (keyboard.IsConfirmed)
                {
                    League = keyboard.Text;
                }
            }

    Why can't you write a sentence like this ;)
    // Do something here. The typed value is stored in "keyboard.Text"
     

    Users who are viewing this thread

    Top Bottom