Surface.CreatePanel
Skip to content
mnscript
MNGuiPanel Surface.CreatePanel(MNGuiPanel) 

Description ​

Creates a panel on the specified UI element.

Arguments ​

MNGuiPanel - The parent UI element to create the new panel under.

Returns ​

MNGuiPanel - The new MNGuiPanel.

Example ​

msc
using Surface;
using System;

MNGuiFrame frame = Surface.CreateApplicationFrame();
MNGuiPanel pnl = frame.GetPanel();

// Creates a panel and fills the screen with it.
MNGuiPanel panel = Surface.CreatePanel(pnl);
panel.DockFill();

// Update to add the new UI to the screen.
Surface.Update();

// Keep the program alive so the UI stays.
while(true){
    System.Sleep(1);
}