Abilitare JavaScript per vedere questo sito.

Interroga il valore di uno specifico elemento UI.

Sintassi

bool get_value(const string &in name, int32 &out value, uint32 flags=0, int32 min=0, int32 max=0)

bool get_value(const string &in name, uint32 &out value, uint32 flags=0, uint32 min=0, uint32 max=0)

bool get_value(const string &in name, double &out value, uint32 flags=0, double min=0, double max=0)

bool get_value(const string &in name, bool &out value)

name

Nome dell'elemento UI

value

Valore letto dall'elemento

flags

Flag di lettura (vedi tabella flag metodi get_value())

min

Valore minimo (usato se specificato check_min)

max

Valore massimo (usato se specificato check_max)

Risultato

Ritorna true se valore letto correttamente, false altrimenti

Nota

Nel caso che l'elemento UI non supporti tale funzionalità, la richiesta renderà semplicemente il valore false

Esempio di utilizzo:

ui::form @my_form;

 

/* Imposta valore intero per elemento UI item-1 */

my_form.set_value("item-1"1000);

 

/* Imposta valore intero in esadecimale per elemento UI item-1 */

my_form.set_value("item-1"1000, 16);

 

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC