Sunday, 15 April 2012

delphi - Listbox: how to scroll many items, with columns, vertically? -



delphi - Listbox: how to scroll many items, with columns, vertically? -

total commander has listbox can scroll, in thumbs mode, vertically, n columns. if 100 items, line 1 has n items, line 2 has n items,.... , scrollbar vertical. cannot in delphi7. added 100 items , set columns=4 scroll horizontal.

how create vertical?

you should consider using tlistview instead of tlistbox. list box used simpler things.

the tlistbox nowadays horizontal scroll bar when columns > 0, according the documentation (emphasis mine):

multi-column list boxes have horizontal scroll bar allows users view multiple columns wrap.

in addition, not limitation of vcl list box control. indeed, according the msdn article on standard windows list box control:

lbs_multicolumn

specifies multi-column list box scrolled horizontally. list box automatically calculates width of columns, or application can set width using lb_setcolumnwidth message. if list box has lbs_ownerdrawfixed style, application can set width when list box sends wm_measureitem message.

a list box lbs_multicolumn style cannot scroll vertically—it ignores wm_vscroll messages receives.

delphi listbox

No comments:

Post a Comment