GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  ]

class Fl_Hold_Browser

Class Hierarchy

Include Files

    #include <FL/Fl_Hold_Browser.H>


The Fl_Hold_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 the item pointed to by it is highlighted, and this highlighting remains on when the mouse button is released. Normally the callback is done when the user releases the mouse, but you can change this with when().

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


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

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

virtual Fl_Hold_Browser::~Fl_Hold_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
void Fl_Browser::value(int)

Set or get which line is selected. This returns zero if no line is

User Comments [ Add Comment ]

From gregd, 21:06 Mar 11, 2006 (score=3)

I'm trying to use one of these.  Fluid creates it, but doesn't include Fl_Hold_Browser.H

So I have to re-modify the header every time I run Fluid. :-(
Reply ]

From rbp, 22:45 Nov 10, 2006 (score=3)

I had the same problem. Open the properties window for the browser, go to the C++ tab and then enter the header file in the 'Extra Code' section.
Reply ]


Comments are owned by the poster. All other content is copyright 1998-2021 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to ''.