BUTTON keyword

Displays a button as an image with optional text.

Syntax

BUTTON "key", string, (posX, posY), "fontname", fontsize, color, "effect", effectvalue

Parameters

  • key: image key to display (required)
  • string: a string expression to display
  • posX: integer of horizontal position
  • posY: integer of vertical position
  • fontname: font to use
  • fontsize: font size as integer
  • color: color specified using hex value
  • effect: possible effect
  • effectvalue: integer value to customize the effect

Example

BUTTON "button_gray"
BUTTON "button_gray", "Start"
BUTTON "button_gray", "Start", (200, 100)
BUTTON "button_gray", "Start", (200, 100), "default"
BUTTON "button_gray", "Start", (200, 100), "default", 50
BUTTON "button_gray", "Start", (200, 100), "default", 50, #0C71FF
BUTTON "button_gray", "Start", (200, 100), "default", 50, #0C71FF, "fade-in"
BUTTON "button_gray", "Start", (200, 100), "default", 50, #0C71FF, "fade-in", 2000

DIM myButton AS BUTTON
myButton = BUTTON "button_gray", "Start"

Go back to list of Keywords.