InputBox

A concrete QuickInput to let the user input a text value.

Note that in many cases the more convenient window.showInputBox is easier to use. window.createInputBox should be used when window.showInputBox does not offer the required flexibility.

Online Documentation

Properties

Link copied to clipboard
abstract var busy: Boolean

If the UI should show a progress indicator. Defaults to false.

Link copied to clipboard

Buttons for actions in the UI.

Link copied to clipboard
abstract var enabled: Boolean

If the UI should allow for user input. Defaults to true.

Link copied to clipboard
abstract var ignoreFocusOut: Boolean

If the UI should stay open even when loosing UI focus. Defaults to false. This setting is ignored on iPad and is always false.

Link copied to clipboard
abstract val onDidAccept: Event<Void?>

An event signaling when the user indicated acceptance of the input value.

Link copied to clipboard

An event signaling when the value has changed.

Link copied to clipboard
abstract var onDidHide: Event<Void?>

An event signaling when this input UI is hidden.

Link copied to clipboard

An event signaling when a button was triggered.

Link copied to clipboard
abstract var password: Boolean

If the input value should be hidden. Defaults to false.

Link copied to clipboard
abstract var placeholder: String?

Optional placeholder shown when no value has been input.

Link copied to clipboard
abstract var prompt: String?

An optional prompt text providing some ask or explanation to the user.

Link copied to clipboard
abstract var step: Int?

An optional current step count.

Link copied to clipboard
abstract var title: String?

An optional title.

Link copied to clipboard
abstract var totalSteps: Int?

An optional total step count.

Link copied to clipboard
abstract var validationMessage: JsAny?

An optional validation message indicating a problem with the current input value. By returning a string, the InputBox will use a default InputBoxValidationSeverity of Error. Returning undefined clears the validation message.

Link copied to clipboard
abstract var value: String

Current input value.

Link copied to clipboard
abstract var valueSelection: Tuple2<JsInt, JsInt>?

Selection range in the input value. Defined as tuple of two number where the first is the inclusive start index and the second the exclusive end index. When undefined the whole pre-filled value will be selected, when empty (start equals end) only the cursor will be set, otherwise the defined range will be selected.

Functions

Link copied to clipboard
abstract override fun dispose()

Dispose of this input UI and any associated resources. If it is still visible, it is first hidden. After this call the input UI is no longer functional and no additional methods or properties on it should be accessed. Instead a new input UI should be created.

Link copied to clipboard
abstract fun hide()

Hides this input UI. This will also fire an QuickInput.onDidHide event.

Link copied to clipboard
abstract fun show()

Makes the input UI visible in its current configuration. Any other input UI will first fire an QuickInput.onDidHide event.