class Label

in global :: Sandbox . UI

A generic text label. Can be made editable.


public bool Selectable { get; set; }

Can be selected

public string Text { get; set; }

Text to display on the label.

public bool IsRich { get; set; }

Set to true if this is rich text. This means it can support some inline html elements.

public int CaretPosition { get; set; }

Position of the text cursor/caret within the text, at which newly typed characters are inserted.

public int TextLength { get; }

Amount of characters in the text of the text entry. Not bytes.

public bool Multiline { get; set; }

Enables multi-line support for editing purposes.

public void ReplaceSelection( string str )

Replace the currently selected text with given text.

public void SetSelection( int start, int end )

Sets the text selection.

public void SetCaretPosition( int pos, bool select = False )

Set the text caret position to the given index.

  • pos Where to move the text caret to within the text.
  • select Whether to also add the characters we passed by to the selection.

public void MoveToWordBoundaryLeft( bool select )

Move the text caret to the closest word start or end to the left of current position. This simulates holding Control key while pressing left arrow key.

  • select Whether to also add the characters we passed by to the selection.

public void MoveToWordBoundaryRight( bool select )

Move the text caret to the closest word start or end to the right of current position. This simulates holding Control key while pressing right arrow key.

  • select Whether to also add the characters we passed by to the selection.

public void MoveCaretPos( int delta, bool select = False )

Move the text caret by given amount.

  • delta How many characters to the right to move. Negative values move left.
  • select Whether to also add the characters we passed by to the selection.

public void RemoveText( int start, int count )

Remove given amount of characters from the label at given position.

public void MoveToLineStart( bool select = False )

Move the text caret to the start of the current line.

  • select Whether to also add the characters we passed by to the selection.

public void MoveToLineEnd( bool select = False )

Move the text caret to the end of the current line.

  • select Whether to also add the characters we passed by to the selection.

public void MoveCaretLine( int offset_line, bool select )

Move the text caret to next or previous line.

  • offset_line How many lines to offset. Negative values move up.
  • select Whether to also add the characters we passed by to the selection.

public void SelectWord( int wordPos )

Select a work at given word position.

public void OnButtonTyped( ButtonEvent e )

😔 No documentation found.

public float ScaleToScreen { get; }

😔 No documentation found.

public Vector2 ScrollOffset { get; set; }

😔 No documentation found.

public Box Box { get; set; }

😔 No documentation found.

public PanelInputType ButtonInput { get; set; }

😔 No documentation found.

public bool RayToLocalPosition( Ray ray, ref Vector2 position, ref float distance )

😔 No documentation found.

public bool AcceptsImeInput { get; }

😔 No documentation found.

public void OnPaste( string text )

😔 No documentation found.

public bool HasMouseCapture { get; }

😔 No documentation found.

public void SetMouseCapture( bool b )

😔 No documentation found.

public bool TryScrollToBottom( )

😔 No documentation found.

public bool TryScroll( Vector2 value )

😔 No documentation found.

public void OnMouseWheel( Vector2 value )

😔 No documentation found.

public bool Blur( )

😔 No documentation found.

public void OnButtonEvent( ButtonEvent e )

😔 No documentation found.

public bool Focus( )

😔 No documentation found.

public void OnKeyTyped( char k )

😔 No documentation found.

public Nullable<Matrix> LocalMatrix { get; }

😔 No documentation found.

public void Invoke( float seconds, Action action )

😔 No documentation found.

public void CancelInvoke( string name )

😔 No documentation found.

public string StringValue { get; set; }

😔 No documentation found.

public bool IsDeleting { get; }

😔 No documentation found.

public void Delete( bool immediate = False )

😔 No documentation found.

public bool WantsDrag { get; }

😔 No documentation found.

public bool CanDragScroll { get; set; }

😔 No documentation found.

public bool HasScrollX { get; }

😔 No documentation found.

public bool AcceptsFocus { get; set; }

😔 No documentation found.

public bool HasScrollY { get; }

😔 No documentation found.

public void AddEventListener( string eventName, Action action )

😔 No documentation found.

public void CreateEvent( string name, object value = null, Nullable<float> debounce = null )

😔 No documentation found.

public void CreateEvent( PanelEvent evnt )

😔 No documentation found.

public Vector2 MousePosition { get; }

😔 No documentation found.

public Vector2 GetTransformPosition( Vector2 pos )

😔 No documentation found.

public bool IsInside( Vector2 pos )

😔 No documentation found.

public float ScaleFromScreen { get; }

😔 No documentation found.

public void AddEventListener( string eventName, Action<PanelEvent> e )

😔 No documentation found.

public bool IsInside( Rect rect, bool fullyInside )

😔 No documentation found.

public void SetChildIndex( Panel child, int newIndex )

😔 No documentation found.

public PanelStyle Style { get; }

😔 No documentation found.

public void OnTemplateSlot( INode element, string slotName, Panel panel )

😔 No documentation found.

public string Tooltip { get; set; }

😔 No documentation found.

public string TooltipClass { get; set; }

😔 No documentation found.

public bool HasTooltip { get; }

😔 No documentation found.

public Transitions Transitions { get; }

😔 No documentation found.

public bool HasActiveTransitions { get; }

😔 No documentation found.

public void SkipTransitions( )

😔 No documentation found.

public object UserData { get; set; }

😔 No documentation found.

public CancellationToken DeletionToken { get; }

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public Label( )

😔 No documentation found.

public TaskSource Task

😔 No documentation found.

public bool TryFindKeyframe( string name, ref KeyFrames keyframes )

😔 No documentation found.

public Vector2 ScrollVelocity

😔 No documentation found.

public IEnumerable<IStyleBlock> ActiveStyleBlocks { get; }

😔 No documentation found.

public float Opacity { get; }

😔 No documentation found.

public void OnLayout( ref Rect layoutRect )

😔 No documentation found.

public bool PreferScrollToBottom { get; set; }

😔 No documentation found.

public bool IsScrollAtBottom { get; }

😔 No documentation found.

public Vector2 ScrollSize { get; }

😔 No documentation found.

public void PlaySound( string sound )

😔 No documentation found.

public void MoveAfterSibling( Panel previousSibling )

😔 No documentation found.

public void InvokeOnce( string name, float seconds, Action action )

😔 No documentation found.

public Nullable<Matrix> GlobalMatrix { get; }

😔 No documentation found.

public void SetPropertyObject( string name, object value )

😔 No documentation found.

public string GetAttribute( string k, string defaultIfNotFound = null )

😔 No documentation found.

public void Bind( string ourPropertyName, object targetObject, string theirPropertyName )

😔 No documentation found.

public RenderFragment ChildContent { get; set; }

😔 No documentation found.

public void StateHasChanged( )

😔 No documentation found.

public void OnRenderFragmentChanged( Panel upTo )

😔 No documentation found.

public void DrawContent( ref RenderState state )

😔 No documentation found.

public void DrawBackground( ref RenderState state )

😔 No documentation found.

public void SetAttribute( string k, string v )

😔 No documentation found.

public Styles ComputedStyle { get; }

😔 No documentation found.

public bool WantsMouseInput( )

😔 No documentation found.

public Panel FindPopupPanel( )

😔 No documentation found.

public bool HasChildren { get; }

😔 No documentation found.

public Panel Parent { get; set; }

😔 No documentation found.

public void DeleteChildren( bool immediate = False )

😔 No documentation found.

public void AddChild( Panel p )

😔 No documentation found.

public void SortChildren( Comparison<Panel> sorter )

😔 No documentation found.

public void SortChildren( Func<TargetType,int> sorter )

😔 No documentation found.

public void SortChildren( Func<Panel,int> sorter )

😔 No documentation found.

public int SiblingIndex { get; }

😔 No documentation found.

public T AddChild( string classnames = null )

😔 No documentation found.

public bool AddChild( ref T outPanel, string classnames = null )

😔 No documentation found.

public IEnumerable<Panel> AncestorsAndSelf { get; }

😔 No documentation found.

public IEnumerable<Panel> Ancestors { get; }

😔 No documentation found.

public IEnumerable<Panel> Descendants { get; }

😔 No documentation found.

public bool IsAncestor( Panel panel )

😔 No documentation found.

public RootPanel FindRootPanel( )

😔 No documentation found.

public IEnumerable<Panel> Children { get; }

😔 No documentation found.

public Scene Scene { get; set; }

😔 No documentation found.

public PanelCreator Add { get; }

😔 No documentation found.

public bool HasContent { get; }

😔 No documentation found.

public bool ShouldDrawSelection { get; set; }

😔 No documentation found.

public int SelectionStart { get; set; }

😔 No documentation found.

public int SelectionEnd { get; set; }

😔 No documentation found.

public void OnDeleted( )

😔 No documentation found.

public void SetProperty( string name, string value )

😔 No documentation found.

public void SetContent( string value )

😔 No documentation found.

public string GetSelectedText( )

😔 No documentation found.

public string GetClipboardValue( bool cut )

😔 No documentation found.

public Rect GetCaretRect( int i )

😔 No documentation found.

public void FinalLayout( Vector2 offset )

😔 No documentation found.

public int GetLetterAt( Vector2 pos )

😔 No documentation found.

public int GetLetterAtScreenPosition( Vector2 pos )

😔 No documentation found.

public bool HasSelection( )

😔 No documentation found.

public void LanguageChanged( )

😔 No documentation found.

public void ScrollToCaret( )

😔 No documentation found.

public List<int> GetWordBoundaryIndices( )

😔 No documentation found.

public void InsertText( string text, int pos, Nullable<int> endpos = null )

😔 No documentation found.

public int GetChildIndex( Panel panel )

😔 No documentation found.

public bool HasHovered { get; }

😔 No documentation found.

public bool HasOutro { get; }

😔 No documentation found.

public void OnHotloaded( )

😔 No documentation found.

public IEnumerable<StyleSheet> AllStyleSheets { get; }

😔 No documentation found.

public bool Switch( PseudoClass c, bool state )

😔 No documentation found.

public bool IsVisible { get; }

😔 No documentation found.

public bool IsVisibleSelf { get; }

😔 No documentation found.

public void Tick( )

😔 No documentation found.

public void OnParentChanged( )

😔 No documentation found.

public StyleSheetCollection StyleSheet

😔 No documentation found.

public Vector2 ScreenPositionToPanelDelta( Vector2 pos )

😔 No documentation found.

public Vector2 ScreenPositionToPanelPosition( Vector2 pos )

😔 No documentation found.

public Vector2 PanelPositionToScreenPosition( Vector2 pos )

😔 No documentation found.

public IEnumerable<Panel> FindInRect( Rect box, bool fullyInside )

😔 No documentation found.

public bool AllowChildSelection { get; set; }

😔 No documentation found.

public bool IsValid { get; }

😔 No documentation found.

public bool HasIntro { get; }

😔 No documentation found.

public void SelectAllInChildren( )

😔 No documentation found.

public bool HasActive { get; }

😔 No documentation found.

public Panel GetChild( int index, bool loop = False )

😔 No documentation found.

public int ChildrenCount { get; }

😔 No documentation found.

public IEnumerable<T> ChildrenOfType( )

😔 No documentation found.

public IEnumerable<string> Class { get; }

😔 No documentation found.

public string Classes { get; set; }

😔 No documentation found.

public void AddClass( string classname )

😔 No documentation found.

public void SetClass( string classname, bool active )

😔 No documentation found.

public void FlashClass( string classname, float seconds )

😔 No documentation found.

public void UnselectAllInChildren( )

😔 No documentation found.

public void ToggleClass( string classname )

😔 No documentation found.

public bool HasClass( string classname )

😔 No documentation found.

public void BindClass( string className, Func<bool> func )

😔 No documentation found.

public string ElementName { get; set; }

😔 No documentation found.

public string Id { get; set; }

😔 No documentation found.

public string SourceFile { get; set; }

😔 No documentation found.

public int SourceLine { get; set; }

😔 No documentation found.

public PseudoClass PseudoClass { get; set; }

😔 No documentation found.

public void RemoveClass( string classname )

😔 No documentation found.

public bool HasFocus { get; }

😔 No documentation found.