|
Category: | Wiki/Software/Widgets | Rating: | |
Name: | Fl_ColumnManager | Popularity: | 7% |
Version: | 1.0 | License: | LGPL |
Author: | Brian Grant | EMail: | bg.consultants |
Created: | Sep 25, 2003 |
Updated: | Sep 27, 2003 |
Home Page: | http://www.ant-s.com/WebContent/FL (2253 visits) |
Download: | http://www.ant-s.com/WebContent/FL/Fl_ColumnManager/Fl_ColumnManager.tgz (1429 visits) |
Description: | An Fl_ColumnManager controls the row sorting of an Fl_Browser.
The class is designed to manage the row sorting of the text in an Fl_Browser. Depressing any column button will cause the rows to be sorted by the text in that column. It uses the column_widths() of the associated browser to draw itself. These widths can be changed interactively. |
[ Submit Article | View All ]No articles found.
[ Submit Comment ]From smoof, 06:31 Nov 04, 2008 (score=3)
Hello,
I am not familiar with fltk and I'm writing a little front-end for a command line program. I need a kind of datagrid to show the output. Yet, I use the Fl_Resize_Browser ( found with cheats at http://seriss.com/people/erco/fltk/#Fl_Resize_Browser )
Your "column manager" seems interesting but I don't understand how to implement it :(
Is it possible to have an example on how to use it ?
thank you
[ Reply ]
From ANT-S, 07:50 Nov 04, 2008 (score=3)
I've uploaded a new version at our website. It has the following "HowTo" in it (the actual lines from a real program):
static Fl_ColumnManager* myColumnManager; // controls column display and sorting
static Fl_Multi_Browser* myDataBrowser;
//....
void make_ui()
{
int H=500,W=800;
myColumnManager = new Fl_ColumnManager(0,H/2+25+0,W,6);
myDataBrowser = new Fl_Multi_Browser(0,H/2+25+6,W,H/2-50-6);
myDataBrowser->column_char('\t');
// let the manager know which browser to manage
myColumnManager->set_browser(myDataBrowser);
}
void add_something(const char* myString, void* myData)
{
myDataBrowser->add(myString,myData);
// let the manager know about changes
myColumnManager->update();
}
[ Reply ]
|
| |