If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Is there an API function or this will require custom coding?
I'm finding something like this recently, none.
wxListCtrl
support virtual mode
no native row header
wxGrid
support native row header
no virtual mode
BTW, Ultimate Grid (https://www.codeproject.com/Articles/20 ... -Home-Page) is flexible,
and easy to use, but it's for MFC, and much slower than wxGrid. As it should be mature, I've found a bug easily when cut a joined cell.
If there is an equivalant in wxWidgets, with higher quality, higher performance and more concise interface, it'll be perfect.
doublemax wrote: ↑Mon Oct 14, 2019 9:42 pm
There is no dedicated rowlabel area in wxListCtrl. The best you could do is to display the row number in the first column.
I have the demand too, with wxListCtrl, to make col and row headers same style,
I have to hide column headers, override OnGetItemColumnAttr .
When supporting sorting (common demand in virtual mode), much more work has to be done.
A combinition of wxListCtrl and wxGrid is perfect.
Last edited by Ronald on Tue Oct 15, 2019 4:37 pm, edited 2 times in total.
Is there an API function or this will require custom coding?
I'm finding something like this recently, none.
wxListCtrl
support virtual mode
no native row header
wxGrid
support native row header
no virtual mode
I don't understand you argument.
On Windows wxListCtrl supports a native header. In fact the whole control on Windows is native - it's just a wrapper around a native list control.
wxGrid does not need to be virtual. It can handle big number of data by itself. And row header is of course not native - the whole control is generic.
ONEEYEMAN wrote: ↑Tue Oct 15, 2019 4:52 am
wxGrid does not need to be virtual. It can handle big number of data by itself. And row header is of course not native - the whole control is generic.
So please elaborate what you mean.
If wxGrid supports huge data, it's a plus.
But I still prefer virtual mode of wxListCtrl/wxListView, reason:
the implementation is elegant
I don't know how wxGrid is implemented to support big data, but I can say explicit virtual mode can win in some cases,
because in explicit virtual mode, functions, like virtual OnGetItemText, have the knownledge to locate the item for displaying most efficiently.
ONEEYEMAN wrote: ↑Tue Oct 15, 2019 12:26 pm
How huge is a "huge"?
Are we talking Google-level data or?
I don't known how big the data should be to show significant difference between wxListCtrl (virutal mode) and wxGrid.
wxGrid may be efficient enough for common big data.
So huge data for testing only.
The result might be one is easier to use (less code), one is more professional (ready to be most efficient, and elegant interface).
Technically wxGrid is always virtual, it just uses a simple default wxGridTableBase as data source which is just an array of array of strings. Therefore random access to cell contents is fast.
doublemax wrote: ↑Tue Oct 15, 2019 1:43 pm
Technically wxGrid is always virtual, it just uses a simple default wxGridTableBase as data source which is just an array of array of strings. Therefore random access to cell contents is fast.
wxGrid is professional inside, and meet the demand.
However no virtual mode interface, no support for special knowledge or sophisticated design to accelerate data acessing.
Though no demands for that big data, not cool enough.
BTW, two copies of data (one in wxGrid object, one out of it) might be inconvenient.