GuiButton
- create on-chart button control

GUI functions
(AmiBroker 6.30)


SYNTAX GuiButton( ''text'', id, x, y, width, height, notifyflags, style = 0)
RETURNS NUMBER
FUNCTION The function creates on-chart GUI button control.

Parameters:

  • "text" - specifies button text
  • id - unique control ID (must be integer greater than zero)
  • x, y - coordinates of top left corner of the control
  • width, height - dimensions of the control
  • notifyflags - define which user actions cause formula to be notified
  • style - defines windows control style (WS_* constants in Windows API) that gets OR-ed with default styles (that are added by AmiBroker automatically and typically are WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_TABSTOP)

Possible notify flags are:

  • notifyClicked - when button/toggle/checkbox/radio is clicked
  • notifySetFocus - when control gets input focus (via mouse or keyboard)
  • notifyKillFocus - when control loses input focus (via mouse or keyboard)
  • notifyHitReturn - when ENTER/RETURN key was pressed in edit field
  • notifyEditChange - when control value changes (text inside edit field, date inside date/time, slider is moved to new position)
  • notifyMouseEnter - when mouse hovers over the control
  • notifyMouseLeave - when mouse leaves control area
The function returns guiNew when control was actually created (wasn't already present in the chart) or guiExisting when control already exists in given chart

For more information about using GUI controls see Tutorial: Using on-chart GUI controls

EXAMPLE
SEE ALSO

References:

The GuiButton function is used in the following formulas in AFL on-line library:

More information:

See updated/extended version on-line.