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 » Virtual arrays and buttons.
icon5.gif  Virtual arrays and buttons. [message #44341] Tue, 24 February 2015 11:04 Go to next message
rxantos is currently offline  rxantos
Messages: 73
Registered: October 2011
Member
I have a virtual array of 100k+ or so items. But want to add some controls to the display of the visible items. Is there a way to do this without creating 100k+ buttons?

If no, then I will just use a menu item, but I wanted to check first.
Re: Virtual arrays and buttons. [message #44342 is a reply to message #44341] Tue, 24 February 2015 11:33 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14175
Registered: November 2005
Ultimate Member
rxantos wrote on Tue, 24 February 2015 11:04
I have a virtual array of 100k+ or so items. But want to add some controls to the display of the visible items. Is there a way to do this without creating 100k+ buttons?

If no, then I will just use a menu item, but I wanted to check first.


No, you need those 100K buttons, unfortunately....

(But thinking about it, I got an interesting new idea how to perhaps solve this for future: What about adding a "column Ctrl" feature, which span the whole column, client code then could read line heights from ArrayCtrl and do what is needed.... in your case, this single Ctrl would represent 100K buttons).
Re: Virtual arrays and buttons. [message #44390 is a reply to message #44342] Thu, 05 March 2015 08:05 Go to previous message
rxantos is currently offline  rxantos
Messages: 73
Registered: October 2011
Member
mirek wrote on Tue, 24 February 2015 05:33
(But thinking about it, I got an interesting new idea how to perhaps solve this for future: What about adding a "column Ctrl" feature, which span the whole column, client code then could read line heights from ArrayCtrl and do what is needed.... in your case, this single Ctrl would represent 100K buttons).


I went the menu route, but the idea seems interesting.

A virtual array of shown controls updated when the index of the top row shown is changed. So if there are 20 rows shown of 100,000 one needs only 20 buttons and not 100,000. Then, when clicked, just add the index of the top row to the index of the button. So if button 5 is clicked and the top row is 100, the result would be row 105.
Previous Topic: GridCtrl: How to display a menu on header right click?
Next Topic: ArrayCtrl Display memory usage
Goto Forum:
  


Current Time: Sun Dec 22 06:58:49 CET 2024

Total time taken to generate the page: 0.04643 seconds