wxGrid vs wxListCtrl
Matías Szeftel
mszeftel at yahoo.com.ar
Sun Feb 18 21:54:33 PST 2007
Milan Babuskov escribió:
> 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).
>
You should store the data in memory and sort it there. Using the ORDER
BY method will be very very expensive in my experience.
> No idea how this works with wxListCtrl?
I usually use a derived wxListCtrl in virtual mode and a wxArray of my
row objects so I can plug my sorting methods.
>
> 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
>
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
More information about the wx-users
mailing list