Scopo
Questa procedura segnala al framework che il documento desidera aggiornare la propria rappresentazione all'interno dell'interfaccia utente.
Questa procedura deve essere usata nei casi in cui la rappresentazione del documento varia senza che nessuna proprietà pubblica del documento vari. In questo caso il framework non è in grado di accorgersi del cambiamento e deve essere avvertito.
Sintassi
Documento.RefreshUserInterface()
Argomenti
Questa procedura non ha argomenti.Esempio di codice
// *********************************************************************
// Fired by a tree when a user expands the node related to this document
// *********************************************************************
event Categoria.OnExpand()
{
// Ho espanso l'albero: forzo l'aggiornamento dell'interfaccia perchè il nome del nodo deve
// cambiare
this.RefreshUserInterface()
}
// ********************************************************************
// Fired by a tree to know which name should by shown for this document
// ********************************************************************
event Categoria.OnGetName(
inout string Name // Name of this document
int NameType // Name Type (i.e. 0 = standard name, 1 = full name...)
IDCollection CallerCollection // This is the collection this document is contained in. It ...
int CallerForm // Caller Form Index
int CallerFrame // Caller Frame Index
)
{
string np = "???" // Numero di prodotti
//
if Prodotti.Loaded
{
np := ToString(Prodotti.Count())
}
//
// Nel nome della categoria voglio indicare il numero di prodotti
Name := FormatMessage(MSG Prodotti, Name, np, ??, ??, ??)
}
// Fired by a tree when a user expands the node related to this document
// *********************************************************************
event Categoria.OnExpand()
{
// Ho espanso l'albero: forzo l'aggiornamento dell'interfaccia perchè il nome del nodo deve
// cambiare
this.RefreshUserInterface()
}
// ********************************************************************
// Fired by a tree to know which name should by shown for this document
// ********************************************************************
event Categoria.OnGetName(
inout string Name // Name of this document
int NameType // Name Type (i.e. 0 = standard name, 1 = full name...)
IDCollection CallerCollection // This is the collection this document is contained in. It ...
int CallerForm // Caller Form Index
int CallerFrame // Caller Frame Index
)
{
string np = "???" // Numero di prodotti
//
if Prodotti.Loaded
{
np := ToString(Prodotti.Count())
}
//
// Nel nome della categoria voglio indicare il numero di prodotti
Name := FormatMessage(MSG Prodotti, Name, np, ??, ??, ??)
}
- I documenti segnalano al framework che la loro rappresentazione nell'interfaccia utente deve cambiare quando variano di stato oppure quando varia una delle proprietà pubbliche. Se la rappresentazione del documento deve variare anche se non variano le proprietà pubbliche, deve essere chiamato il metodo RefreshUserInterface per ottenere l'aggiornamento.
Ultima modifica: 25/10/2016 / Validità: da 6.5.2680
procedura