On After Edit
Code | Pode ser chamado por | Definição |
---|---|---|
45 | 4D View Pro area - 4D Write Pro area - Combo Box - Form - Input - Hierarchical List - List Box - List Box Column | O conteúdo do objecto inserível que tem o foco acabou de ser modificado |
Descrição
Caso geral
This event can be used filter the data entry in keyboard enterable objects at the lowest level.
When it is used, this event is generated after each change made to the contents of an enterable object, regardless of the action that caused the change, i.e.:
- Standard editing actions which modify content like paste, cut, delete or cancel;
- Dropping a value (action similar to paste);
- Any keyboard entry made by the user; in this case, the
On After Edit
event is generated after theOn Before Keystroke
andOn After Keystroke
events, if they are used. - Any modification made using a language command that simulates a user action (i.e.,
POST KEY
).
Within the On After Edit
event, text data being entered is returned by the Get edited text
command.
4D View Pro
O objecto devolvido pelo comando FORM Event
contém:
Propriedade | Tipo | Descrição |
---|---|---|
code | inteiro longo | On After Edit |
description | text | "On After Edit" |
objectName | text | Nome da área 4D View Pro |
sheetName | text | Nome da folha do evento |
action | text | "editChange", "valueChanged", "DragDropBlock", "DragFillBlock", "formulaChanged", "clipboardPasted" |
Depending on the action
property value, the event object will contain additional properties.
action = editChange
Propriedade | Tipo | Descrição |
---|---|---|
range | object | Cell range |
editingText | variant | O valor do editor actual |
action = valueChanged
Propriedade | Tipo | Descrição |
---|---|---|
range | object | Cell range |
oldValue | variant | Valor da célula antes da alteração |
newValue | variant | Valor da célula após a alteração |
action = DragDropBlock
Propriedade | Tipo | Descrição |
---|---|---|
fromRange | object | Range of source cell range (being dragged) |
toRange | object | Range of the destination cell range (drop location) |
copy | boolean | Specifies if the source range is copied or not |
insert | boolean | Specifies if the source range is inserted or not |
action = DragFillBlock
Propriedade | Tipo | Descrição |
---|---|---|
fillRange | object | Intervalo utilizado para o preenchimento |
autoFillType | longint | Valor utilizado para o enchimento. |
action = formulaChanged
Propriedade | Tipo | Descrição |
---|---|---|
range | object | Cell range |
formula | text | A fórmula introduzida |
action = clipboardPasted
Propriedade | Tipo | Descrição |
---|---|---|
range | object | Cell range |
pasteOption | inteiro longo | Specifies what is pasted from the clipboard: |
pasteData | object | The data from the clipboard to be pasted |
Exemplo
Here is an example handling an On After Edit
event:
If(FORM Event.code=On After Edit)
If(FORM Event.action="valueChanged")
ALERT("WARNING: You are currently changing the value\
from "+String(FORM Event.oldValue)+\
" to "+String(FORM Event.newValue)+"!")
End if
End if
End if
End if
End if
End if
The above example could generate an event object like this:
{
"code":45;
"description":"On After Edit";
"objectName":"ViewProArea"
"sheetname":"Sheet1";
"action":"valueChanged";
"range": {area:ViewProArea,ranges:[{column:1,row:2,sheet:1}]};
"oldValue":"The quick brown fox";
"newValue":"jumped over the lazy dog";
}