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 » Selection changes before LostFocus() is called
Re: Selection changes before LostFocus() is called [message #13255 is a reply to message #13234] Wed, 26 December 2007 11:50 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
loki wrote on Sun, 23 December 2007 18:32

Yeah. I am getting better. Very Happy

This one should fix it. But please have a look on it.

void ArrayCtrl::DoPoint(Point p, bool dosel) {
	if(!HasFocusDeep())
		SetWantFocus();
	
	p.y += sb;
	if(p.y >= GetTotalCy() && IsAppendLine())
		KillCursor();
	clickpos.y = GetLineAt(p.y);
	if(!IsNull(clickpos.y))
		SetCursor0(clickpos.y, dosel);
	else
	if(IsCursor())
		AcceptRow();
}


Tomorrow I will check the one when in RowEdit-Mode.

greetings
loki


Well, you are right that the behaviour should be consistent.

The problem is that SetWantFocus was moved from the place you suggest to the end of DoPoint in 2005.

The motivation in ArrayCtrl is that sometimes you want to know the previous focus placement when doing WhenSel.

Therefore, maybe, we should rather fix TreeCtrl(?)

Mirek
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: mouse-event on arrayctrl-header
Next Topic: ArrayCtrl sorting
Goto Forum:
  


Current Time: Wed May 08 08:03:37 CEST 2024

Total time taken to generate the page: 0.02567 seconds