Saltar para o conteúdo principal
Versão: v20 R3 BETA

On Clicked

CodePode ser chamado porDefinição
44D View Pro Area - 4D Write Pro area - Button - Button Grid - Check Box - Combo Box - Dropdown list - Form - Hierarchical List - Input - List Box - List Box Column - Picture Button - Picture Pop up menu - Plug-in Area - Progress Indicators - Radio Button - Ruler - Spinner - Splitter - Stepper - Tab controlOcorreu um clique num objecto

Descrição

The On Clicked event is generated when the user clicks on an object.

Alguns objetos do formulário podem ser ativados com o teclado. Por exemplo, quando uma caixa de verificação recebe o foco, pode ser introduzida utilizando a barra de espaços. In such a case, the On Clicked event is still generated.

The On Clicked event usually occurs once the mouse button is released. No entanto, há várias excepções:

  • Invisible buttons: The On Clicked event occurs as soon as the click is made and does not wait for the mouse button to be released.
  • Rulers: If the Execute object method option is set to true, the On Clicked event occurs as soon as the click is made.
  • Combo boxes: The On Clicked event occurs only if the user selects another value in the associated menu. A combo box must be treated as an enterable text area whose associated drop-down list provides default values. Consequently, you handle data entry within a combo box through the On Before Keystroke, On After Keystroke and On Data Change events.
  • Drop-down lists: The On Clicked event occurs only if the user selects another value in the menu. The On Data Change event allows you to detect the activation of the object when a value different from the current value is selected
  • When a list box input cell is being edited, the On Clicked event is generated when the mouse button is pressed, allowing to use the Contextual click command for example.

In the context of an On Clicked event, you can test the number of clicks made by the user by means of the Clickcount command.

On Clicked e On Double Clicked

After the On Clicked or On Double Clicked object event property is selected for an object, you can detect and handle the clicks within or on the object, using the FORM event command that returns On Clicked or On Double Clicked, depending on the case.

If both events are selected for an object, the On Clicked and then the On Double Clicked events will be generated when the user double-clicks the object.

4D View Pro

This event is generated when the user clicks anywhere on a 4D View Pro document. On this context, the event object returned by the FORM Event command contains:

PropriedadeTipoDescrição
codeinteiro longoOn Clicked
descriptiontext"On Clicked"
objectNametextNome da área 4D View Pro
sheetNametextNome da folha do evento
rangeobjectIntervalo de células

Exemplo

 If(FORM Event.code=On Clicked)
VP SET CELL STYLE(FORM Event.range;New object("backColor";"green"))
End if