Table of Contents

Class InputBox

Namespace
NanoByte.Common.Controls
Assembly
NanoByte.Common.WinForms.dll

Shows a simple dialog asking the user to input some text.

public sealed class InputBox : Form
Inheritance
object
MarshalByRefObject
Component
Control
ScrollableControl
ContainerControl
Form
InputBox
Extension Methods

Methods

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true if managed resources should be disposed; otherwise, false.

Show(IWin32Window?, string, string, string?, bool)

Displays an input box asking the the user to input some text.

public static string? Show(IWin32Window? owner, string title, string prompt, string? defaultText = null, bool password = false)

Parameters

owner IWin32Window

The parent window the displayed window is modal to; can be null.

title string

The window title to use.

prompt string

The prompt to display.

defaultText string

The default text to show pre-entered in the input field.

password bool

Shall the input characters be hidden as a password?

Returns

string

The text the user entered if she pressed OK; otherwise null.