ListControl SelectedItem Text (1 Viewer)

nuggie

Portal Member
June 12, 2009
12
0
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
 

Users who are viewing this thread

Top Bottom