API ReferenceSandbox.UI

PanelEventclass

Base `Sandbox.UI.Panel` event. See `Sandbox.UI.Panel.CreateEvent(Sandbox.UI.PanelEvent)`.

objectPanelEvent
Namespace
Sandbox.UI
Assembly
Sandbox.Engine
Declaration
public class Sandbox.UI.PanelEvent

Constructors1

Showing 1 constructors

public PanelEvent(string eventName, Sandbox.UI.Panel active = null)PUBLICCONSTRUCTOR

ParameterTypeDescription
eventNamestring
active = nullPanel

Methods2

Showing 2 methods

public bool Is(string name)PUBLIC

ParameterTypeDescription
namestring
Returns:bool

public void StopPropagation()PUBLIC

Returns:void

Properties6

Showing 6 properties

public string Sandbox.UI.PanelEvent.Name { get; set; }PUBLICGETSET

Returns:string

public Sandbox.UI.Panel Sandbox.UI.PanelEvent.This { get; set; }PUBLICGETSET

The panel on which the event is being called. For example, if you have a button with a label.. when the button gets clicked the actual click event might come from the label. When the event is called on the label, This will be the label. When the event propagates up to the button This will be the button - but Target will be the label. This is mainly of use with Razor callbacks, where you want to get the actual panel that created the event.

Returns:Panel

public float Sandbox.UI.PanelEvent.Time { get; set; }PUBLICGETSET

Returns:float

public object Sandbox.UI.PanelEvent.Value { get; set; }PUBLICGETSET

Returns:object

On this page