home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
VirtualKeyboard Set Text
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="thlucas" data-source="post: 731673" data-attributes="member: 111098"><p>I am curious about this functionality as well for MP versions prior to v1.2.0.</p><p></p><p>If developing for MP v1.2.0 and above, you can use the "SetLabelAsInitialText" method and the "Label" property to set the initial value - note that this is only supported under MP v1.2.0 and above though. This method and property do not exist prior to v1.2.0, and will generate compiler errors if you try to use them in prior versions. </p><p></p><p>I think it's kinda weird that they have the "SetLabelAsInitialText" method - why not just display whatever is set in the "Label" property as the initial text? Why the extra line of code to the method? </p><p></p><p>Note that it still does not solve the "text-at-end" problem. ie when I start typing, it wipes out the original entry and replaces it with the characters entered. Here's the code I used.</p><p></p><p>[CODE]</p><p> // display virtual keyboard.</p><p> // MPVersion Compatibility notes:</p><p> // - VirtualKeyboard SetLabelAsInitialText method is not supported prior to v1.2.0.0!</p><p> // - VirtualKeyboard Label property is not supported prior to v1.2.0.0!</p><p> VirtualKeyboard kbd = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD);</p><p> kbd.Reset();</p><p> kbd.Label = "My Initial Text";</p><p> kbd.SetLabelAsInitialText();</p><p> kbd.DoModal(this.GetID);</p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="thlucas, post: 731673, member: 111098"] I am curious about this functionality as well for MP versions prior to v1.2.0. If developing for MP v1.2.0 and above, you can use the "SetLabelAsInitialText" method and the "Label" property to set the initial value - note that this is only supported under MP v1.2.0 and above though. This method and property do not exist prior to v1.2.0, and will generate compiler errors if you try to use them in prior versions. I think it's kinda weird that they have the "SetLabelAsInitialText" method - why not just display whatever is set in the "Label" property as the initial text? Why the extra line of code to the method? Note that it still does not solve the "text-at-end" problem. ie when I start typing, it wipes out the original entry and replaces it with the characters entered. Here's the code I used. [CODE] // display virtual keyboard. // MPVersion Compatibility notes: // - VirtualKeyboard SetLabelAsInitialText method is not supported prior to v1.2.0.0! // - VirtualKeyboard Label property is not supported prior to v1.2.0.0! VirtualKeyboard kbd = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD); kbd.Reset(); kbd.Label = "My Initial Text"; kbd.SetLabelAsInitialText(); kbd.DoModal(this.GetID); [/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
VirtualKeyboard Set Text
Contact us
RSS
Top
Bottom