wxGrid vs wxListCtrl

Milan Babuskov milanb at panonnet.net
Sun Feb 18 13:26:50 PST 2007


Hello,

After years of using wxWidgets, I still find it hard to make that 
decision: which of these two components to use.

For example, I making a new application now and it needs to display a 
grid or list of items, about 100-1000 of them depending on the user. The 
control only needs to display text. Other requirements are:

1. Ability to sort by a column (after click on column header)

With wxGrid I can use virtual table that would fetch the data the way I 
need it (possibly by altering ORDER BY clause on database query). 
Sorting in memory doesn't seem problematic either (it's only ~1000 items 
after all).

No idea how this works with wxListCtrl?

2. Behaves the same (or at least similar) on Windows and Linux
3. Ability to navigate with keyboard

I noticed that on Linux it sometimes happens that you cannot Enter 
wxGrid by tabing into it. Is this perhaps fixed in some recent versions 
of wx?

4. Ability to drag a row and drop it to some other control (wxTreeCtrl 
to be more precise).

5. Ability to reorder columns by simply doing drag&drop.

I could live without this one.



What I'm interested in is: if you had all these requirements, which 
control would you choose?


TIA

-- 
Milan Babuskov
http://www.guacosoft.com
http://www.flamerobin.org





More information about the wx-users mailing list