LinkLabel Class (RWE.GameOn.Core.Extensions)

Class
LinkLabel

Usage:

Represents a label of text that appears as a hyperlink.

LinkLabel

Properties:

  • Text.ToString
    String – Sets the text value for the UI Element.
LinkLabel1.Text.ToString = "Click Me";
  • src
    Variable – Sets the link for the UI Element.
LinkLabel1.src = Function();
  • src.ToString
    String – Sets the link for the UI Element to a string.
LinkLabel1.src.ToString = "https://www.example.com";
  • AutoSize
    Boolean – Defines whether the UI Element should be autosized.
LinkLabel1.AutoSize = true;
  • Height
    Variable – Sets the height of the UI Element.
LinkLabel1.Height = 30px;
  • Width
    Variable – Sets the width of the UI Element.
LinkLabel1.Width = true;
  • Font
    Variable – Sets the font of the UI Element.
LinkLabel1.Font = default;
LinkLabel1.Font = new Font("Arial", 24,FontStyle.Bold);
  • Font.Size
    Variable – Sets the size of the font of the UI Element.
LinkLabel1.Font.Size = default;
LinkLabel1.Font.Size = 12px;

//Note: you can change the font size using .Font, as follows:
TextLabel1.Font = new Font("Arial", 12,FontStyle.Bold);
  • Font.Style
    Variable – Sets the style of the font of the UI Element.
LinkLabel1.Font.Style = FontStyle.Bold;
LinkLabel1.Font.Style = FontStyle.Underline;
LinkLabel1.Font.Style = FontStyle.Italic;
LinkLabel1.Font.Style = FontStyle.Strikethrough;

//Note: you can change the font style using .Font, as follows:
LinkLabel1.Font = new Font("Arial", 12,FontStyle.Bold);
  • Font.Colour
    Variable – Sets the Colour of the Font of the UI Element.
LinkLabel1.Font.Colour = ColourSpace.Red;
LinkLabel1.Font.Colour = new ColourSpace(HEX("#hexcode"));
LinkLabel1.Font.Colour = new ColourSpace(ARGB(RRR,GGG,BBB,ALPHA));
LinkLabel1.Font.Colour = new ColourSpace(ARGB(RRR,GGG,BBB,ALPHA));

//You can use .Color and ColorSpace too!
  • Font.Weight
    Variable – Sets the weight of the font of the UI Element.
LinkLabel1.Font.Weight = FontStyle.SemiBold;
LinkLabel1.Font.Weight = 300;

//Note: you can change the font style using .Font, as follows:
LinkLabel1.Font = new Font("CustomFont", 12,FontStyle.SemiBold);
LinkLabel1.Font = new Font("CustomFont", 12,Font.Weight(300));
  • visibility
    Variable – Determines whether the UI Element is visible or not.
LinkLabel1.Visibility = visible;
LinkLabel1.Visibility = invisible;
  • dock
    Variable – Docks the UI element to a specific location within the container or window.
LinkLabel1.Dock = top;
LinkLabel1.Dock = left;
LinkLabel1.Dock = right;
LinkLabel1.Dock = bottom;
LinkLabel1.Dock = fill;
LinkLabel1.Dock = none;
  • Padding
    Variable – Adds padding to the UI element.
LinkLabel1.Padding.Top = 3px;
LinkLabel1.Padding.Left = 3px;
LinkLabel1.Padding.Right = 3px;
LinkLabel1.Padding.Bottom = 3px;
LinkLabel1.Padding.All = 3px;
  • anchor
    Variable – Defines a location for the UI element to anchor to within the container.
LinkLabel1.Anchor = top, left;
LinkLabel1.Dock = bottom, right;

Example:

new ContentPanel = Panel1();
         Panel1.Dock = fill;
         Panel1.Padding.Left = 3px;
         Panel1.Contents 
         {
             new LinkLabel1 = LinkLabel1();
                 LinkLabel1.Text.ToString = "Click Me!";
                 LinkLabel1.src.ToString = "http://www.example.com";
         }
Menu