I have just read the "How to write a plugin for Media Portal" guide and it says:
I want to be able to change the text of a label, but since lblText isn't initialized it can't be used. I searched the forum and found that you should use the GetControl method. So my code looks like:
But I get this error:
Am I missing a reference? Any help is appreciated
Note you can use this for any control, for example a label control could be mapped by:
[SkinControlAttribute(1)] protected GUILabelControl lblText=null;
I want to be able to change the text of a label, but since lblText isn't initialized it can't be used. I searched the forum and found that you should use the GetControl method. So my code looks like:
Code:
[SkinControlAttribute(1)]
protected GUILabelControl lblText = (GUILabelControl)GetControl(1);
But I get this error:
Error 1 An object reference is required for the nonstatic field, method, or property 'MediaPortal.GUI.Library.GUIWindow.GetControl(int)' D:\Docs\Code\- C#\MyMPPlugin\MyMPPlugin\Class1.cs 40 62 MyMPPlugin
Am I missing a reference? Any help is appreciated