Jump to content

Virtual Multicolumn Listbox


mje

Recommended Posts

Even with UI updates being deferred? I can't decide if that's possibly a bug or should be changed via a feature request...

Indeed, even with the UI updates deferred. Granted these are user reports, so minutes might need to be taken with a generous dose of salt, I've not been able to try these data sets out.

Part of the problem was my fault since I never bounded the size of the data set: the application was designed around small data sets where blindly updating everything was OK. There were far more important things on the priority list than eeking out a few extra ms of performance from a UI update. Move from a few hundred to a few hundred thousand rows though and things are a different story.

These controls (trees, mclb) seem to be implemented such that once you've applied formatting to cells, the control remembers that formatting data for every cell regardless of whether that cell has data in it. I'm not arguing this shouldn't be the case, but it becomes troublesome since there seems to be no means to clear the formatting data.

Once you've applied formatting to a large number of cells, operating on that data set becomes slow. Combine that with the fact that applying each facet of formatting requires an individual operation for each cell and the number of operations required can quickly multiply. Want to set font color, style, and justification? That's four operations per cell: cell selection, apply color, apply style, apply justification. If your format cache is big, each of those operations can be slower than if the cache is small, and if you're blindly applying those instructions on a 100000x8 data set, you better have some time on your hands.

Of course I'm not implying anyone should ever do that many operations on any of these controls, again this problem arose from using the program for something outside of it's original design. The right thing to do in this case is a virtual solution like I posted above.

Link to comment
These controls (trees, mlcb) seem to be implemented such that once you've applied formatting to cells, the control remembers that formatting data for every cell regardless of whether that cell has data in it. I'm not arguing this shouldn't be the case, but it becomes troublesome since there seems to be no means to clear the formatting data.

Also true - I have a job I just delvered where I color cells based on OK/Suspect data - then, when new measurements come in, I can't assume the dataset is the same size, so I have to color an arbitrary number of cells white first, then color the OK/Suspect cells - I agree that there needs to be a method to clear formatting.

Link to comment

You could use the following code to set all cells of mclb to the same format.

post-853-0-56691200-1324396823.png

This not a "clear formatting" method, but it works and it's efficient.

Regards,

Olivier

I've also used this and its other variants (for selecting all columns in a row etc.). It works pretty well.

Now we need a way to select all alternate (even/odd) rows/columns. That'll help when you are trying to color alternate rows/columns for ease of following a large table across/down.

Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.