InputPanel

References
public sealed class InputPanel
Utility class for aggregating controls to be shown on input panels. This panel (when complete) will populate a Menu or Form or PopOver or....

Properties

Category

#
Gets the current category. Any items added to the panel will belong to a frame with the category name.
public string Category { get; }

Count

#
Gets the number of elements on this panel.
public int Count { get; }

Methods

Add

#
Add an element to this panel.
public void Add(
Control
element
)

AddBar

#
public Bar AddBar(
drawCategoryLabels,
elementHeight,
params BarItem[]
elements
)

AddBar

#
Add a tool bar to this panel.
public Bar AddBar(
drawCategoryLabels,
True if the bar should be big enough to show the category names.
params BarItem[]
elements
Tool bar elements.
)

AddCheck

#
Add a checkbox to this input.
public CheckBox AddCheck(
text,
checked,
checkedChanged,
tooltip = null
)

AddLabel

#
Add a label to this input.
public Label AddLabel(
text,
italic = false,
tooltip = null
)

AddSpace

#
Add a blank vertical gap to this panel. Rows sit two pixels apart, which is right for a run of related bars but too tight when one group of them needs setting apart from the group above.
public Control AddSpace(
height = 6
Height of the gap, on top of the two pixels a row already gets.
)

AddText

#
Add a textbox to this input.
public TextBox AddText(
text,
textChanged,
tooltip = null
)

BeginCategory

#
Create a disposable category block.
public IDisposable BeginCategory(
category
Name of category.
)
Disposable category to be used inside a 'using' block.

MoveCategoryBelow

#
Move an existing category directly underneath another.
public bool MoveCategoryBelow(
category,
Category to move.
above
Target category.
)
True if 'category' is now directly below the 'above' category.

RemoveCategory

#
Remove a category from this panel. You typically wouldn't do this except sometimes it's less work to let a base class populate the panel and then remove some nonsensical category afterwards.
public bool RemoveCategory(
name
)

RenameCategory

#
Rename a category.
public bool RenameCategory(
oldName,
newName
)

ShowAsForm

#
Populate a title-bar less form with the panel contents. An attempt will be made to place the form _next to_ the bounds but failing that it will be placed next to the point.
public Form ShowAsForm(
Control
owner,
Control which owns this popup.
PointF
point,
Point location.
RectangleF
bounds
Source region in control coordinates.
)

ToEtoControl

#
Create an Eto control which hosts all the inputs on this panel.
public Control ToEtoControl()