Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » How to create a GridCtrl with fixed cell size
Re: How to create a GridCtrl with fixed cell size [message #16027 is a reply to message #16026] Fri, 23 May 2008 11:54 Go to previous messageGo to previous message
cbpporter is currently offline  cbpporter
Messages: 1427
Registered: September 2007
Ultimate Contributor
mrjt wrote on Fri, 23 May 2008 12:14


Vector<Foo *> seems a reasonable option (although you could use Vector< Ptr<Foo> >), but I'm struggling to think of a situation where this would be necessary. Can the view not just use a const reference to the Vector? Or does it need a special subset of items?

Well, since you asked, yes I have such a situation. It is rather messy. I have a collection of over 13000 items which are organized in multiple "views". These views are subsets of the original collection, and all have their particular order. Items can and often will be in a lot of views at the same time. The number of total views is not yet determined, but it is over 50. Through an interface a filter can be defined which allows and item or rejects it. This must update all the views, determine some basic statistics (i.e. items accepted vs. items rejected) and must work in "real-time" on a low-end system. Any number of views can be visible at all times (though luckily limited by screen resolution). Since applying the filter on each view is not feasible, I apply it on the main collection and use those vectors for displaying and to compute the statistics.

So there were two solutions.
1. Use a lot of configuration files (possibly XML) and a lot of instance variables and even a lot more enums. Maintenance nightmare.
2. Use 3 classes full of templates and just a small number of constants and generate the sets programatically by parametrized classes so I don't end up with with dozens of instance variables.

I chose the second one.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: bad align of an optionbutton in gridctrl
Next Topic: GridCtrl - copy all [Feature Request]
Goto Forum:
  


Current Time: Tue Apr 29 19:48:35 CEST 2025

Total time taken to generate the page: 0.04042 seconds