[confirm] Virtual keyboard rendering problem (1 Viewer)

seco

Retired Team Member
  • Premium Supporter
  • August 7, 2007
    1,575
    1,239
    Home Country
    Finland Finland
    I'm using the code below to display a virtual keyboard for the user. The method parameter "strLine" is supposed to be the text that is visible in the keyboard when it is first shown to user.

    However it seems that if this string parameter is long enough the text will not show at all when the keyboard is displayed (screenshot 1). If I use backspace on the keyboard to delete characters, at some point the cursor will show up but there is no text (screenshot 2). Eventually deleting more characters show the beginning of the text (screenshot 3).

    The full string in this particular case is "Stratovarius – Under Flaming Winter Skies - Live in Tampere (The Jörg Michael Farewell Tour)"

    Code:
    /// <summary>
    /// Gets the input from the virtual keyboard window.
    /// </summary>
    public static bool GetStringFromKeyboard(ref string strLine)
    {
        if (strLine == null)
            strLine = "";
     
        VirtualKeyboard keyboard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD);
     
        keyboard.Reset();
        keyboard.Text = strLine;
        keyboard.DoModal(GUIWindowManager.ActiveWindow);
     
        if (keyboard.IsConfirmed)
        {
            strLine = keyboard.Text;
           
            if (!String.IsNullOrEmpty(strLine))
                return true;
        }
     
        return false;
    }
     

    Attachments

    • keyboard1.png
      keyboard1.png
      260.6 KB
    • keyboard2.png
      keyboard2.png
      251 KB
    • keyboard3.png
      keyboard3.png
      248.1 KB

    seco

    Retired Team Member
  • Premium Supporter
  • August 7, 2007
    1,575
    1,239
    Home Country
    Finland Finland
    • Thread starter
    • Moderator
    • #2
    Anyone? I understand that this is just cosmetic but...
     

    Users who are viewing this thread

    Top Bottom