Skip to content

UITabContainer.AddComponentToTab Method

Definition

Namespace: Brine2D.UI

Overloads
AddComponentToTab\(int, IUIComponent\) Adds a component to the specified tab by index.
AddComponentToTab\(string, IUIComponent\) Adds a component to the specified tab by title.

UITabContainer.AddComponentToTab\(int, IUIComponent\) Method

Adds a component to the specified tab by index.

C#
public void AddComponentToTab(int tabIndex, Brine2D.UI.IUIComponent component);

Parameters

tabIndex System.Int32

component IUIComponent

Remarks

Component positions are \<b>content-origin-relative\</b>: (0, 0) places the component at the top-left corner of the tab's content area \(directly below the tab bar\). Use GetContentOrigin() to convert a content-relative position to an absolute screen position when needed elsewhere.

UITabContainer.AddComponentToTab\(string, IUIComponent\) Method

Adds a component to the specified tab by title.

C#
public void AddComponentToTab(string tabTitle, Brine2D.UI.IUIComponent component);

Parameters

tabTitle System.String

component IUIComponent

Remarks

Component positions are content-origin-relative. See AddComponentToTab\(int, IUIComponent\).