Boost logo

Boost :

From: Philippe A. Bouchard (philippe_at_[hidden])
Date: 2003-07-28 06:44:37


Bronek Kozicki wrote:

[...]

> Uh. I would not recommend inheriting from STL. I think that template
> policies would be rather more appropriate solution:

Agreed.

> typedef boost::gui::list<std::list<std::string>,
> boost::gui::win32::listbox, boost::gui::fast_signals> mylistbox;

I personnally prefer seeing something similar to:

typedef std::list< boost::entry<lineEdit, std::string> > listbox;

typedef std::list< boost::container<listbox, boost::gui::fast_signals> >
mylistbox;

Because you have more control over individual listbox' entries. Take for
example MS Excel. It is a spread sheet (list< list< entry<lineEdit,
std::string> > >) with different popups on each entry, depending on its
data type and other user-defined conditions.

Even a listBox can be a list< list< entry<...> > > with hidden columns, etc.

What I would like to see is a listBox of lineEdits, labels, or even
pushbuttons or labeled checkboxes, like the Advanced Options in MS Internet
Explorer.

> myWindow.create_widget<mylistbox>(myapp::ENUM_ID_LIST_OF_ITEMS,
> boost::gui::position(30, 30));
> myWindow(myapp::ENUM_ID_LISTOFITEMS).append(myData.begin(),
> myData.end());
>
> (just an idea)

Do not forget dynamic layout management... ;)

-- 
Philippe A. Bouchard

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk