Skip to content
doyousketch2 edited this page Sep 5, 2019 · 21 revisions

Browser:

Corresponds to: Fl_Browser

Inherits from: Browser_, Widget

  • fl.Browser( int X, int Y, int W, int H, *str title ) ==> userdata
  • fl.Browser{ table } ==> userdata (table constructor syntax)
  • obj:add( *str newtext )
  • obj:clear()
  • obj:displayed( int line# ) ==> bool
  • obj:hide( [ int line# ] )
  • obj:insert( int line#, *str newtext )
  • obj:load( str filename ) ==> bool, *str (1 if OK, 0 on error w/ reason)
  • obj:make_visible( int line# )
  • obj:move( int to, int from )
  • obj:remove( int line# )
  • obj:select( int line# ) ==> bool
  • obj:selected( int line# ) ==> bool
  • obj:show( [ int line# ] )
  • obj:size( int W, int H )
  • obj:swap( int line#A, int line#B )
  • obj:text( int line# ) ==> *str label
  • obj:text( int line#, str newtext )
  • obj:line_visible( int line# ) ==> bool (corresponds to Fl_Browser::visible(int line#))
  • methods defined for the Browser_ userdata type
  • methods defined for the Widget userdata type
  • obj.type ==> str get
  • obj.type = str set
  • obj.value ==> int get
  • obj.value = int set
  • obj.nitems ==> int lines (corresponds to Fl_Browser::size())
  • obj.topline ==> int get line#
  • obj.topline = int set line#
  • obj.bottomline ==> int get line#
  • obj.bottomline = int set line#
  • obj.middleline ==> int get line#
  • obj.middleline = int set line#
  • obj.column_char ==> str get (default '\t' tab)
  • obj.column_char = str set
  • obj.format_char ==> str get (default @)
  • obj.format_char = str set
  • obj.column_widths ==> table get
  • obj.column_widths = table set
  • properties defined for the Browser_ userdata type
  • properties defined for the Widget userdata type

(note: Browser does not inherit the methods and properties of Group, although Fl_Browser is implemented as a sub-class of Fl_Group!)

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

  • "FL_NORMAL_BROWSER" (the default)
  • "FL_SELECT_BROWSER"
  • "FL_HOLD_BROWSER"
  • "FL_MULTI_BROWSER"

Clone this wiki locally