Associating data with wxListCtrl in virtual mode
Lloyd
lloyd at cdactvm.in
Tue Dec 12 02:32:28 PST 2006
Thanks vadim, It will take some time (for me) to understand what you
suggested :)
Thanks again
Lloyd.
On Tue, 2006-12-12 at 11:09 +0100, Vadim Zeitlin wrote:
> On Tue, 12 Dec 2006 15:34:17 +0530 Lloyd <lloyd at cdactvm.in> wrote:
>
> L> I know wxLC_VIRTUAL is meant for when we have 1000s of rows! If I try to
> L> sort my huge vector each time, it will take considerable time!
> L>
> L> Can I solve this problem without sorting the vector?
>
> Only by maintaining a separate mapping between positions on the screen and
> indices in the vector. This wouldn't be much faster if your vector contains
> "small" objects (or pointers to large ones) though. It still can be a good
> idea if you use the indices into this vector from other parts of your
> program. In general I'd advise abstracting access to the data via methods
> such as GetItemAtPosition() which would make it clear whether you access
> the item by internal index or its position on screen and would allow you to
> change the implementation later.
>
> Regards,
> VZ
>
______________________________________
Scanned and protected by Email scanner
More information about the wx-users
mailing list