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 Ctrl on selection? (Creating Ctrls for every column makes the program VERY slow so I prefer doing it just on the selected cell)
How to create a Ctrl on selection? [message #52572] Tue, 22 October 2019 16:15 Go to previous message
SidusBrist is currently offline  SidusBrist
Messages: 4
Registered: October 2019
Junior Member
Hi,
I'm making an excel-like program.
I have an ArrayCtrl with dynamic columns and I wanted to add Ctrls so that you can edit the content.

I was trying to add them by default for every column, so I made this:

if (f.isAlpha){
	table.ColumnAt(table.GetColumnCount()-1).Ctrls<EditString>();
}
else {
	if (f.nDecimals>0){
		table.ColumnAt(table.GetColumnCount()-1).Ctrls<EditDouble>();
	}
	else {
		table.ColumnAt(table.GetColumnCount()-1).Ctrls<EditInt>();
	}
}


Unfortunately it's very slow, both the loading of the table and the program itself once it's loaded.
So I had an idea... When you click on a cell, it creates the edit just for that cell and if you click outside or press "enter" it destroys itself and the new value is updated.

The question is... how can I do this? Shocked
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Button in Array segfault
Next Topic: How to access Fixed Columns?
Goto Forum:
  


Current Time: Sat Apr 20 11:52:50 CEST 2024

Total time taken to generate the page: 0.03442 seconds