Saltar para o conteúdo principal
Versão: Próximo

On After Edit

CodePode ser chamado porDefinição
454D View Pro area - 4D Write Pro area - Combo Box - Form - Input - Hierarchical List - List Box - List Box ColumnO 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.

Cuando se utiliza, este evento se genera después de cada cambio realizado en el contenido de un objeto editable, independientemente de la acción que haya provocado la modificación, es decir:

  • Standard editing actions which modify content like paste, cut, delete or cancel;
  • Eliminar um valor (ação semelhante a colar);
  • Any keyboard entry made by the user; in this case, the On After Edit event is generated after the On Before Keystroke and On After Keystroke events, if they are used.
  • Cualquier modificación realizada mediante un comando del lenguaje que simule una acción del usuario (es decir, POST KEY).

Within the On After Edit event, text data being entered is returned by the Get edited text command.

4D View Pro

El objeto devuelto por el comando FORM Event contiene:

PropriedadeTipoDescrição
codeinteiro longoOn After Edit
descriptiontext"On After Edit"
objectNametextNome da área 4D View Pro
sheetNametextNome da folha do evento
actiontext"editChange", "valueChanged", "DragDropBlock", "DragFillBlock", "formulaChanged", "clipboardPasted"

En función del valor de la propiedad action, el objeto evento contendrá propiedades adicionales.

action = editChange

PropriedadeTipoDescrição
rangeobjectIntervalo de células
editingTextvariantO valor do editor actual

action = valueChanged

PropriedadeTipoDescrição
rangeobjectIntervalo de células
oldValuevariantValor da célula antes da alteração
newValuevariantValor da célula após a alteração

action = DragDropBlock

PropriedadeTipoDescrição
fromRangeobjectIntervalo do células de origem (a ser arrastado)
toRangeobjectIntervalo de células de destino (local de largada)
copybooleanEspecifica se o intervalo fonte é copiado ou não
insertbooleanEspecifica se o intervalo fonte é inserido ou não

action = DragFillBlock

PropriedadeTipoDescrição
fillRangeobjectIntervalo utilizado para o preenchimento
autoFillTypeinteiro longoValue used for the fill.
  • 0: Cells are filled with all data (values, formatting, and formulas)
  • 1: Cells are filled with automatically sequential data
  • 2: Cells are filled with formatting only
  • 3: Cells are filled with values but not formatting
  • 4: Values are removed from the cells
  • 5: Cells are filled automatically
  • fillDirectioninteiro longoDirection of the fill.
  • 0: The cells to the left are filled
  • 1: The cells to the right are filled
  • 2: The cells above are filled
  • 3: The cells below are filled
  • action = formulaChanged

    PropriedadeTipoDescrição
    rangeobjectIntervalo de células
    formulatextA fórmula introduzida

    action = clipboardPasted

    PropriedadeTipoDescrição
    rangeobjectIntervalo de células
    pasteOptioninteiro longoSpecifies what is pasted from the clipboard:
  • 0: Everything is pasted (values, formatting, and formulas)
  • 1: Only values are pasted
  • 2: Only the formatting is pasted
  • 3: Only formulas are pasted
  • 4: Values and formatting are pasted (not formulas)
  • 5: Formulas and formatting are pasted (not values)
  • pasteDataobjectThe data from the clipboard to be pasted
  • "text" (text): The text from the clipboard
  • "html" (text): The HTML from the clipboard
  • Exemplo

    Aquí hay un ejemplo de manejo de un evento On After Edit:

     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

    O exemplo acima poderia gerar um objeto evento como este:

    {

    "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";
    }