mnscript
MNGuiLabel Surface.CreateLabel(MNGuiPanel)
Description ​
Creates a label on the specified UI element.
Arguments ​
MNGuiPanel
- The parent UI element to create the new label under.
Returns ​
MNGuiLabel
- The new MNGuiLabel.
Example ​
msc
using Surface;
using System;
MNGuiFrame frame = Surface.CreateApplicationFrame();
MNGuiPanel pnl = frame.GetPanel();
// Creates a panel and fills the screen with it.
MNGuiLabel label = Surface.CreateLabel(pnl);
label.DockFill();
label.SetText("Hello World!");
// Update to add the new UI to the screen.
Surface.Update();
// Keep the program alive so the UI stays.
while(true){
System.Sleep(1);
}