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)
Re: How to create a Ctrl on selection? [message #52587 is a reply to message #52586] Thu, 24 October 2019 14:32 Go to previous messageGo to previous message
SidusBrist is currently offline  SidusBrist
Messages: 4
Registered: October 2019
Junior Member
I tried but nothing happens... I click on the row but the box doesn't appear Sad

table.AddRowNumColumn(" ",45);
table.ColumnAt(0).SetDisplay(Single<WhiteFill>());
std::ifstream infile(pb);
std::string line;
while (std::getline(infile, line))
{
	std::istringstream iss(line);
	CobolField f(line.c_str());
	if (f.isField){
		fields.push_back(f);
		std::string columnDescription = "Da " + std::to_string(f.start+1) + " a " + std::to_string(f.end) + " per " + std::to_string(f.size) + " byte";
		if (f.shortenedName!="FILLER"){
			table.AddColumn(f.shortenedName,120);
		}
		else {
			table.AddColumn(f.shortenedName,40);
			table.HeaderTab(table.GetColumnCount()-1).SetInk(Color(196,196,196));
		}
		if (f.isK001){
			Font font = table.HeaderTab(table.GetColumnCount()-1).GetFont();
			font.Underline(true);
			table.HeaderTab(table.GetColumnCount()-1).SetFont(font);
		}
		table.ColumnAt(table.GetColumnCount()-1).Tip(columnDescription.c_str());
		if (f.isAlpha){
			table.ColumnAt(table.GetColumnCount()-1).Edit(editString);
		}
		else {
			if (f.nDecimals>0){
				table.ColumnAt(table.GetColumnCount()-1).Edit(editDouble);
			}
			else {
				table.ColumnAt(table.GetColumnCount()-1).Edit(editInt);
			}
		}
		table.Appending().Removing().Duplicating();
		CobolField::fieldStart = CobolField::fieldStart + f.size;
	}
	if (f.isXSYS){
		break;
	}
}
table.SetLineCy(EditField::GetStdHeight());


P.S.: I just realized "AddColumn" returns the column so I don't need to always use table.ColumnAt()...
 
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: Wed Aug 27 21:55:41 CEST 2025

Total time taken to generate the page: 0.06096 seconds