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

Botão imagem

A picture button is similar to a standard button. However unlike a standard button (which accepts three states: enabled, disabled and clicked), a picture button has a different image to represent each state.

Os botões imagem podem ser utilizados de duas formas:

  • Como botões de comando num formulário. In this case, the picture button generally includes four different states: enabled, disabled, clicked and rolled over. For example, a table of thumbnails that has one row of four columns, each thumbnail corresponds to the Default, Clicked, Roll over, and Disabled states.

    PropriedadeNome JSONValor
    Switch back when ReleasedswitchBackWhenReleasedtrue
    Switch when Roll OverswitchWhenRollovertrue
    Use Last Frame as DisableduseLastFrameAsDisabledtrue
  • Como botão de imagem que permite ao usuário escolher entre várias opções. Neste caso, pode ser utilizado um botão de imagem em vez de um menu pop-up de imagem. As a picture button letting the user choose among several choices. In this case, a picture button can be used in place of a pop-up picture menu. As a picture button letting the user choose among several choices. In this case, a picture button can be used in place of a pop-up picture menu. Suppose you want to give the users of a custom application the opportunity to choose the interface language for the application. You implement the option as a picture button in a custom properties dialog box:

Clicar no objeto altera a imagem.

Usar os botões imagem

É possível implementar um botão imagem da seguinte forma:

  1. First, prepare a single graphic in which the series of images are arranged in a row, a column, or a row-by-column grid.

You can organize pictures as columns, rows, or a row-by-column grid (as shown above). When organizing pictures as a grid, they are numbered from left to right, row by row, beginning with 0. For example, the second picture of the second row of a grid that consists of two rows and three columns, is numbered 4 (The UK flag in the example above).

  1. Next, make sure the image is in your project's Resources and enter the path in the Pathname property.

  2. Definir as propriedades de linhas e colunas do gráfico.

  3. Especifique quando as imagens mudam selecionando as propriedades animation adequadas.


In addition to the standard positioning and appearance settings, you can set some specific properties for picture buttons, especially concerning how and when the pictures are displayed. Estas opções de propriedade podem ser combinadas para melhorar seus botões de imagem.

  • By default (when no animation option is selected), a picture button displays the next picture in the series when the user clicks; it displays the previous picture in the series when the user holds down the Shift key and clicks. When the user reaches the last picture in the series, the picture does not change when the user clicks again. Por outras palavras, não regressa à primeira imagem da série.

Estão disponíveis os seguintes outros modos:

Propriedades compatíveis

Bold - Border Line Style - Bottom - Button Style - Class - Columns - Focusable - Font - Font Color - Height - Help Tip - Horizontal Sizing - Italic - Left - Loop back to first frame - Object Name - Pathname - Right - Rows - Shortcut - Standard action - Switch back when released - Switch continuously on clicks - Switch every x ticks - Title - Switch when roll over - Top - Type - Use Last frame as disabled - Variable or Expression - Vertical Sizing - Visibility - Width