Fl_ColumnManager 1.0

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Back To Listings  ]
 
Category:Wiki/Software/WidgetsRating:
3.25 
Name:Fl_ColumnManagerPopularity:6%
Version:1.0License:LGPL
Author:Brian GrantEMail:bg.consultants
Home Page:http://www.ant-s.com/WebContent/FL (1880 visits)
Download:http://www.ant-s.com/WebContent/FL/Fl_ColumnManager/Fl_ColumnManager.tgz (1005 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.


Articles

Submit Article | View All ]

No articles found.


Comments

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 ]
 
 

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