Sidebar

Home



Expressions V4


Tutorials

How-To

Reference

  Lexical basics
  Type system
  Variables and assignment
  Operators
  Expression rules
  Control flow
  Functions
  Built-in functions
   None and NaN
   Arithmetic
   Algebra
   Logarithmic and Exponential
   Trigonometric
   Rounding and Centering
   Strings
   Output, Formatting, and Errors
   Dialogs, Clipboard, Platform, and Paths
  Methods and properties
  Built-in methods
   Common Value Methods
   Number Methods
   String Basic Methods
   String Slice Methods
   String Parsing Methods
   String Formatting Methods
   String Regex Methods
   String Trim and Case Methods
  Objects
  Built-in objects
   Global objects
    settings
    session
    python
   Collections
    array
    map
    data_array
   File Format I/O
    image_data
    image_stream
   Utils
    crypto
    timer
   Comm
    serial
   Dialogs
    file_open
    file_save
    msg_ok
    msg_ok_cancel
    msg_yes_no
    msg_password
   GUI objects
    window
    panel
    group
    splitpanel
    label
    textbutton
    drawablebutton
    togglebutton
    togglegroup
    textinput
    textedit
    numinput
    slider
    combobox
    listbox
    progressbar
    led
    separator
    menu
    image
    snake
  Classes and user-defined objects
  Include system
  Error model
  Execution model and sessions
  Host integration
  Limits and performance
  Formal reference
  Glossary

Cookbook

exprv4:reference:objects:dialog_msg_password

msg_password

`msg_password()` creates a password OK/Cancel dialog object.

Use it when the user must enter a password or other hidden text.

Constructor

msg_password()

Creates a password dialog.

dlg = msg_password();

Properties

Property Type Description
`title` string Dialog title.
`message` string Dialog message text.
`buttons` boolean Whether dialog buttons are shown.
`password_label` string Label shown next to the password field.
`password` string Initial password before showing; result password after the dialog returns.
`has_result` boolean `true` after the dialog has produced a result.
`action` string Result action: `ok`, `cancel`, or `none`.
`ok` boolean `true` when OK was selected.
`cancel` boolean `true` when Cancel was selected.
`save` boolean Save flag in result map. Usually `false` for `msg_password`.

Methods

Method Returns Description
`title(text)` self Sets the dialog title.
`message(text)` self Sets the dialog message.
`buttons(enabled)` self Shows or hides dialog buttons.
`password_label(text)` self Sets password field label.
`password(text)` self Sets initial password text.
`on_result(callback)` self Sets asynchronous result callback.
`show()` map or self Shows the dialog. Returns result map unless `on_result()` is used.
`click_ok()` boolean Clicks OK on an active asynchronous dialog.
`click_close()` boolean Clicks Close on an active asynchronous dialog.

Example

result = msg_password()
    .title("Password")
    .message("Enter password")
    .password_label("Password:")
    .show();
 
if (result.ok)
{
    print(result.password);
}

Previous: msg_yes_no

Next: GUI objects

exprv4/reference/objects/dialog_msg_password.txt · Last modified: by 127.0.0.1

Page Tools