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!)
ListControl SelectedItem 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="nuggie" data-source="post: 472770" data-attributes="member: 95634"><p>Hi,</p><p></p><p>I have a general question:</p><p></p><p>How can i get the label/text of the selected item of a listcontrol in the method onClick(...)</p><p></p><p> protected override void OnClicked(int controlId, GUIControl control,</p><p> MediaPortal.GUI.Library.Action.ActionType actionType)</p><p> {</p><p> if (controlId == 4)</p><p> test.testmethod(....);</p><p> base.OnClicked(controlId, control, actionType);</p><p> }</p><p></p><p>in testmethod i need the label/text of the selected listcontrol item as a parameter.</p><p></p><p>Thanks for the help</p><p></p><p>Best regards</p><p>nuggie</p><p></p><p>damn,</p><p></p><p> [SkinControlAttribute(4)]</p><p> public GUIListControl List = null;</p><p></p><p>and </p><p></p><p>protected override void OnClicked(int controlId, GUIControl control,</p><p>MediaPortal.GUI.Library.Action.ActionType actionType)</p><p>{</p><p>if (controlId == 4)</p><p>test.testmethod(List.SelectedListItem.Label);</p><p>base.OnClicked(controlId, control, actionType);</p><p>}</p><p></p><p>was the solution.</p><p></p><p>Sorry! :sorry:</p><p></p><p>Best regards</p><p>nuggie</p></blockquote><p></p>
[QUOTE="nuggie, post: 472770, member: 95634"] Hi, I have a general question: How can i get the label/text of the selected item of a listcontrol in the method onClick(...) protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) { if (controlId == 4) test.testmethod(....); base.OnClicked(controlId, control, actionType); } in testmethod i need the label/text of the selected listcontrol item as a parameter. Thanks for the help Best regards nuggie damn, [SkinControlAttribute(4)] public GUIListControl List = null; and protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) { if (controlId == 4) test.testmethod(List.SelectedListItem.Label); base.OnClicked(controlId, control, actionType); } was the solution. Sorry! :sorry: Best regards nuggie [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
ListControl SelectedItem Text
Contact us
RSS
Top
Bottom