Hi,
I have an browser, it contains items (only leafs - all are top-level), and
they have small icon.
The layout is strange - see attachment, placement of the square icons is not
the same (it depends on the length of other columns in given row).
The text and icons are strangely aligned left/right a bit (each different).
If one of the columns (its text) is a bit longer, then it brakes into 2
lines and goes crazy overall.
If I change size of first column "nazwa" from -1 to say 200, then entire
text is strangely centered horizontally (overalapping all other columns -
totally wrong).
Any idea why?
mTreeTow = new Browser(treeGW+marg, marg+detailH+50,
mGroupMain->w()-treeGW-marg*3, mGroupMain->h()-marg-marg-detailH-50);
ASSERT(mTreeTow);
mTreeTow->add_shortcut(fltk::ALT + 't');
mTreeTow->indented(0);
mTreeTow->display_lines(1);
mTreeTow->leaf_symbol(&imgObj1);
mTreeTow->group_symbol(&imgFolder);
mTreeTow->callback( cb_tree_tow );
{
const char *labels[] = {"Nazwa", "Brutto", "VAT", "Min.", 0};
int widths[] = {200, 80, 50, 70, 0};
mTreeTow->column_widths(widths); mTreeTow->column_labels(labels);
}
mTreeTow->deselect();
and then the list is built dynamically in program, by using
browser->clear();
fltk::Widget *item = browser->add_leaf(str.c_str(), NULL);
item->flags(RAW_LABEL);
item->user_data( (void*)tow );
item->h(hM);
browser->layout();
browser->goto_top();
browser->yposition(0);
browser->set_item_opened(false);
browser->set_item_selected(true, false); // 2nd==do callback
--
RafaĆ Maj
Software developer
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk