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 » U++ Widgets - General questions or Mixed problems » ColumnList question (move and delete item)
Re: ColumnList question (move and delete item) [message #2800 is a reply to message #2798] Tue, 25 April 2006 20:26 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
OK, added.

Will be in next release, however, if you really need it now, just add/replace these methods in ColumnList:

void ColumnList::Insert(int ii, const Value& val, bool canselect)
{
	Item& m = item.Insert(ii);
	int c = -1;
	if(cursor >= ii) {
		c = cursor + 1;
		KillCursor();
	}
	m.value = val;
	m.sel = false;
	m.canselect = canselect;
	m.display = NULL;
	Refresh();
	SetSb();
	if(c >= 0)
		SetCursor(c);
}

void ColumnList::Insert(int ii, const Value& val, const Display& display, bool canselect)
{
	Insert(ii, val, canselect);
	item[ii].display = &display;
}

void ColumnList::Remove(int ii)
{
	int c = -1;
	if(cursor >= ii) {
		c = max(ii, cursor - 1);
		KillCursor();
	}
	item.Remove(ii);
	Refresh();
	SetSb();
	if(c >= 0)
		SetCursor(c);
}

void ColumnList::Add(const Value& val, bool canselect)
{
	Insert(item.GetCount(), val, canselect);
}

void ColumnList::Add(const Value& val, const Display& display, bool canselect)
{
	Add(val);
	item.Top().display = &display;
}



Mirek
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to run timer just a several cycles?
Next Topic: DropList cores on ClearList()
Goto Forum:
  


Current Time: Sat Aug 02 04:35:29 CEST 2025

Total time taken to generate the page: 0.21935 seconds