Wiki Navigation
- Loading...
Description
A label to display text in MediaPortal.
Further Information
- For skin designers
GUILabelControl Public Methods
Method Name |
Parameter |
Description |
---|---|---|
AllocResources |
|
Allocate any direct3d sources |
Animate |
Float, Animator |
|
CanFocus |
Boolean |
Checks if the control can focus. |
Dispose |
|
Free any direct3d resources |
DrawText |
Float, Float, String, Integer |
xpos, ypos, label, width |
DrawTextWidth |
Float, Float, String, Float |
xpos, ypos, label, fMaxWidth |
FinalizeConstruction |
|
This function is called after all of the XmlSkinnable fields have been filled with appropriate data. Use this to do any construction work other than simple data member assignments, for example, initializing new reference types, extra calculations, etc.. |
OnMessage |
GUIMessage |
This method is called when a message was recieved by this control. |
Render |
Float |
Renders the text onscreen. |
SetPosition |
Integer, Integer |
dwPosX, dwPosY |
SetShadow |
Integer, Integer, Long |
Set the shadow properties (angle, distance, color) |
GUILabelControl Public Properties
Property Name |
Type |
Description |
---|---|---|
_containsPropertyKey |
Boolean |
Property which returns true if the label contains a property or false when it doesn't |
CacheFont |
Boolean |
Property to get/set the usage of the font cache. If enabled the rendered text is cached. If not it will be re-created on every render() call |
FontName |
String |
Get/set the name of the font. |
Height |
Integer |
|
Label |
String |
Get/set the text of the label. |
ShadowAngle |
Integer |
|
ShadowColor |
Long |
|
ShadowDistance |
Integer |
|
TextAlignment |
GUIControl.Alignment |
Get/set the alignment of the text |
TextColor |
Long |
Get/set the color of the text |
TextHeight |
Integer |
Returns the height of the current text |
TextVAlignment |
VAlignment |
Get/set the vertical alignment of the text |
TextWidth |
Integer |
Returns the width of the current text |
Width |
Integer |
|
Using GUILabelControl from a plugin
using System; using System.Windows.Forms; using MediaPortal.GUI.Library; namespace OurPlugin { public class Class1 : GUIWindow, ISetupForm { [SkinControlAttribute(1)] protected GUILabelControl lblOne = null; public Class1() { } public override bool Init() { return Load(GUIGraphicsContext.Skin+@"\ourplugin.xml"); } protected override void OnPageLoad() { lblOne.SetPosition(80, 60); lblOne.Label = "Test"; lblOne.FontName = "font13"; lblOne.TextColor = 4278190080; } } }
This page has no comments.