Aller au contenu principal
Version: 20 R5 BETA

On Clicked

CodePeut être appelé parDéfinition
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 controlUn clic a été effectué sur un objet

Description

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

Certains objets de formulaire peuvent être activés avec le clavier. Par exemple, une fois qu'une case à cocher obtient le focus, elle peut être saisie à l'aide de la barre d'espace. In such a case, the On Clicked event is still generated.

The On Clicked event usually occurs once the mouse button is released. Cependant, il existe plusieurs exceptions :

  • 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 et 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

Cet événement est généré lorsque l'utilisateur clique n'importe où dans un document 4D View Pro. On this context, the event object returned by the FORM Event command contains:

PropriétéTypeDescription
codeentier longOn Clicked
Descriptiontext"On Clicked"
objectNametextNom de la zone 4D View Pro
sheetNametextNom de la feuille de l'événement
rangeobjectPlage de cellule

Exemple

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