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 » About the movement of a row in a ArrayCtrl
Re: About the movement of a row in a ArrayCtrl [message #4046 is a reply to message #4035] Tue, 18 July 2006 11:01 Go to previous messageGo to previous message
forlano is currently offline  forlano
Messages: 1213
Registered: March 2006
Location: Italy
Senior Contributor
forlano wrote on Mon, 17 July 2006 17:38

Hello,

at the moment using CTRL+'up' or CTRL+'down' a row can be moved up or down. Unfortunately after the movement the cursor disappear, so if the user wants to continue to move the same row he needs to click and select it once more. This is unconfortable especially if one row should be moved a lot.

I would like that after the moving of a row the cursor remains on the same row.

Luigi


The previous feature can be obtained modifying the ArrayCtrl.cpp file in the method Move()
void ArrayCtrl::Move(int dir) {
	int c = GetCursor();
	int d = c + dir;
	if(c < 0 || c >= GetCount() || d < 0 || d >= GetCount()) return;
	Vector<Value> row(ReadRow(c), 0);
	Set(c, ReadRow(d));
	Set(d, row);
	SetCursor(d);
	// WhenArrayAction(); // <----- modification
}

If I comment the above line I get the wanted behaviour (the cursor do not run away). But, what may happen if I comment the WhenArrayAction() callback? It seems to work OK...

Luigi

[Updated on: Tue, 18 July 2006 13:58]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Is it possible to set the Font type for the arrayctrl?
Next Topic: Multi-line entries
Goto Forum:
  


Current Time: Sun Aug 17 17:14:12 CEST 2025

Total time taken to generate the page: 0.05401 seconds