A Button is a control that by pressing it, the end-user can execute actions like insert, update, delete, print, go to another object, etc.).
To insert a Button control into a form, drag the Button icon from the GeneXus Toolbox to the desired part.
Every button must be associated with an event.
The event may already exist in the object (it could be a System Event or a User defined event that was already defined in the object), or you can define a new User defined event for the button you are creating.
For this, each button has the On Click Event property to assign the name of the event that will be executed at the moment of clicking on the control.
In the shown example, the pointed button has the 'List Attractions By Country' event assigned to its On Click Event property.
The 'List Attractions By Country' is a User defined event that was previously defined in the Events section of the object. Inside its code, the only action defined is a call to the AttractionsList object (sending to it the &CountryId variable value).
Moreover, every button has the Control Name property to define the control name that identifies it inside the object.
The size of a button is determined by the length of its label (Caption property value). If you want all the buttons in the form to have the same size, or you want to have one of them with a specific size, you can associate a Theme Class to the button that has the characteristics (Height and Width) you want.
You can have standard or rounded buttons too, and you can design them using Theme.
You can create in a form an Action Group Control for the Web or an Action Group Control for Smart Devices and insert inside it a group of buttons in order to define Toolbars or Menus.
Action Group Control for the Web
Action Group Control for Smart Devices