Skip to content
doyousketch2 edited this page Sep 6, 2019 · 14 revisions

Button:

Corresponds to: Fl_Button

Inherits from: Widget

  • fl.Button( int X, int Y, int W, int H, *str label ) ==> userdata Widget
  • fl.Button{ table entries } ==> userdata Widget (table constructor syntax)

  • methods defined for the Widget userdata type
  • properties defined for the Widget userdata type
  • obj:clear() (same as obj.value = 0)
  • obj:set() (same as obj.value = 1)
  • obj:setonly() (button on + others in group off)
  • obj.value ==> bool status get ( 1 on, 0 off )
  • obj.value = int status set ( > 0 on, 0 off )
  • obj.down_box ==> str Fl_Boxtype get Fl_Boxtype
  • obj.down_box = str Fl_Boxtype set Fl_Boxtype
  • obj.shortcut ==> userdata (shortcut key)
  • obj.shortcut = int|str|userdata (shortcut key)
  • obj.down_color ==> userdata get Fl_Color
  • obj.down_color = int|userdata set Fl_Color
  • obj.type ==> str mode get (see below)
  • obj.type = str mode set (see below)

Different behavior for the button can be selected by setting its type property / mode to one of:

  • "FL_NORMAL_BUTTON" (the default)
  • "FL_TOGGLE_BUTTON"
  • "FL_RADIO_BUTTON"
Clone this wiki locally