Configurable event buttons have been a feature of Artisan since version 0.5.0 way back in 2011. Button configurations defined in 2011 still work in the latest Artisan versions in 2025.
This article discusses button layouts and how hidden buttons can be used as spacers and for performing actions. A best practice for configuring hidden action buttons is described. Information is provided about how a recent change might, under certain conditions, affect the visual appearance of pre-existing button layouts and how to correct them.
The details on how individual buttons are defined and how to configure the option fields is not covered here. For details on how to define and use buttons see these articles.
Events, Buttons and Palettes
Buttons – Appearance, State, and Action
Information on how hidden buttons can be used to perform actions that are referenced from other buttons or from alarms can be found in this video.
Artisan Alarms: annotation profiles
When and how might Artisan v3.4 affect pre-existing button layouts?
The visual display of a pre-existing button layout may be affected if there are hidden buttons at the top of the Events Buttons Table, above the first visible button. If these hidden buttons at the top of the table and have the Type or Action field defined it means they did double duty in past versions and functioned also as spacers. Hidden action buttons at the top of the Events Buttons Table no longer act as spacers (buttons with actions can be spacers only when they are below the first visible button). New hidden buttons with no action, that will be recognized as spacers, will need to be added. It is a quick and simple adjustment to get back to the layout as it was displayed in earlier versions. In the last section of this article is an example that shows how to do this.
How do button layouts work and how do hidden buttons work as spacers?
Buttons are laid out in a series of consecutive rows. The width of all rows is measured as a number of buttons. The number of buttons per row is determined by the "Max Buttons Per Row" setting. With one exception that we'll discuss later in this article, all buttons visible and hidden are counted to determine the width of each row.
The displayed width of individual buttons is dependent on several factors including the "Button Size" setting, the length of the button's text label and whether the button is visible or hidden.
Because individual buttons can have different widths each row could have a different displayed width. Artisan centers the display of each row of buttons. Here is an example showing the width of normal buttons, a hidden button and a button stretched by its label text.
The first step in creating a custom button layout is to open the Buttons tab in the Events dialog (menu Config>> Events, Buttons tab). Some machine setups come with a predefined button layout, others are blank. Either way custom buttons may be added.
The buttons definitions are held in a table known as the Events Buttons Table. In this article we'll refer to it simply as the buttons table.
Button layouts can have a maximum of 50 buttons in each row. To use that many will require quite a wide screen. There can be a maximum of 10 button rows. In addition to the 500 displayed buttons, there can be an unlimited number of hidden action buttons at the top of the button table. We hope this number of buttons will satisfy the needs of users for the foreseeable future.
Multiple button layouts can be configured into palettes allowing for fast switching between them. Palettes can be saved and restored. For more information see Events, Buttons and Palettes.
How can hidden buttons be used as spacers?
Hidden buttons have a small displayed width so they can be used as spacers to separate buttons or to make recognizable button groups. Hidden buttons can also hold actions that can be referenced from other buttons or from alarms. We'll talk more about this use in the next section below. For now let's focus on hidden buttons as visual spacers. From here on we'll refer to these hidden spacer buttons simply as spacers.
The images below show an example buttons table and the resulting display. Max Buttons per Row is set to 8. The table has 16 entries. The first eight entries are the first row of buttons. The second eight entries compose the second row of buttons. The first row has two visible buttons and six hidden buttons (Visibility=OFF). Recall that Artisan will center each row of buttons in the display. Hidden buttons have a small width so they can be used as spacers. Thus the arrangement of three spacers before and after the two visible buttons allows the visible buttons to be properly centered in the display. The second row demonstrates how spacers can be used between visible buttons.
What is the best practice for using hidden buttons to perform actions?
The example above showed how hidden buttons can be used as spacers to make button displays more readable. Hidden buttons have another powerful use. They can perform actions that are referenced by other buttons or by alarms. Because hidden buttons are counted in each display row it has been typical for these hidden action buttons to be the last entries at the bottom of the button table. Other times a hidden button is used as both a spacer and a referenced action button. Unfortunately, changes to the button table, like adding or deleting a button, can change the table row number of the action button. The table row number IS the reference, so all references to that button must be updated to keep everything working.
With Artisan v3.4 and later it is possible to create an arbitrary number of hidden action buttons whose table row number can remain fixed no matter how many changes are made to the visible buttons. Hidden action buttons can now be totally independent from changes made to the number and layout of visible buttons. This is a critical requirement as Artisan is increasingly used to automate roaster operations: changes to the visible buttons must not break the automation actions.
This is accomplished by constructing the button table so the hidden action buttons are all at the top of the table and before any buttons that are part of the display. These action buttons are not counted as part of the first row so they do not affect the displayed buttons. Since they are at the top of the button table any changed to the displayed buttons below them has no effect on their table row numbers.
Let's return to the previous example and add some action buttons at the top of the table. These two added hidden action buttons do not affect the button layout. We can add as many hidden action buttons as are necessary without affecting the button layout. And, changes to the button layout will not impact the table row numbers of hidden action buttons.
Please note that table row 3 contains a spacer. Spacers have no actions defined (the Type and Action fields are both blank). Spacers are counted as a button in displayed button row 1 as described earlier. While it is hidden it is also considered displayed since spacers have a small width. Hidden action buttons at the top of the button table are truly hidden and are not displayed.
For new button tables it is recommended to place all hidden action buttons at the top and put all displayed buttons (visible and spacers) below.
Example how to correct if v3.4 altered your button display (breaking change)
The following button table illustrates a case where v3.4 will alter a previously defined button display.
This is how the buttons looked in earlier versions.
And this is how they appear in v3.4. That is because the the buttons in table rows 1 and 2 were previously counted as hidden spacers in the first displayed button row. Since they are no longer counted or displayed, two of the buttons from former button row 2 moved up into row 1.
To correct the display we need to add two new spacer buttons just below (after) the hidden action buttons. The number of hidden spacers to add will equal the number of hidden action buttons that previously acted as both spacer and action buttons.
If your button layout is displayed differently from previous versions just add an equivalent number of spacers just below the existing action buttons at the top of the button table.
If you have any questions or comments please start a Discussion item.
Dave










