Documentation

  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  ]
 

class Fl_Select_Browser


Class Hierarchy

Include Files

    #include <FL/Fl_Select_Browser.H>
    

Description

The Fl_Select_Browser class is a subclass of Fl_Browser which lets the user select a single item, or no items by clicking on the empty space. As long as the mouse button is held down on an unselected item it is highlighted. Normally the callback is done when the user presses the mouse, but you can change this with when().

See Fl_Browser for methods to add and remove lines from the browser.

Methods

Fl_Select_Browser::Fl_Select_Browser(int x, int y, int w, int h, const char *label = 0)

Creates a new Fl_Select_Browser widget using the given position, size, and label string. The default boxtype is FL_DOWN_BOX .

virtual Fl_Select_Browser::~Fl_Select_Browser()

The destructor also deletes all the items in the list.

int Fl_Browser::deselect()

Deselects any selected item.

int Fl_Browser::select(int,int=1)
int Fl_Browser::selected(int) const

You can use these for compatibility with Fl_Multi_Browser. If you turn on the selection of more than one line the results are unpredictable.

int Fl_Browser::value() const

Returns the number of the highlighted item, or zero if none. Notice

User Comments [ Add Comment ]

From Seth, 05:29 Jan 20, 2003 (score=1)

It will really be nice to know the purpose of the parameters to Fl_Browser::select and Fl_Browser::selected as they are not really self explanatory.
Reply ]

From Anonymous, 16:16 Jul 08, 2003 (score=2)

Ummm.... maybe select() selects items from the list and selected() tells you whether the given item is selected....
Reply ]

From rbp, 21:26 Oct 20, 2006 (score=3)

yep, and you can also unselect items with select(int,int=1) by puting the second argument to 0.
Reply ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2015 by Bill Spitzak and others. This project is hosted by Seriss Corporation. Please report site problems to 'erco@seriss.com'.