Table of Contents

Method GetTextFromUser

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

GetTextFromUser(string?, string?, string?, Control?, int, int, bool)

Pop up a dialog box with title set to caption, message, and a defaultValue. The user may type in text and press OK to return this text, or press Cancel to return the empty string.

public static string? GetTextFromUser(string? message, string? caption, string? defaultValue = null, Control? parent = null, int x = -1, int y = -1, bool centre = true)

Parameters

message string

Dialog message.

caption string

Dialog title.

defaultValue string

Default value. Optional.

parent Control

Parent control. Optional.

x int

X-position on the screen. Optional. By default is -1.

y int

Y-position on the screen. Optional. By default is -1.

centre bool

If true, the message text (which may include new line characters) is centred; if false, the message is left-justified.

Returns

string