| 
 | 
 | 
 
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Selection changes before LostFocus() is called 
	| 
		
 |  
	| 
		
 |  
	| 
		
 |  
	
		
		
			| Re: Selection changes before LostFocus() is called [message #13234 is a reply to message #13226] | 
			Mon, 24 December 2007 00:32    | 
		 
		
			
				
				
				
					
						  
						loki
						 Messages: 36 Registered: October 2007 
						
					 | 
					Member  | 
					 | 
		 
		 
	 | 
 
	
		Yeah. I am getting better.     
 
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
		
		
		[Updated on: Mon, 24 December 2007 00:37] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 |  
	| 
		
 |  
	
		
		
			| Re: Selection changes before LostFocus() is called [message #13264 is a reply to message #13255] | 
			Wed, 26 December 2007 21:02   | 
		 
		
			
				
				
				
					
						  
						loki
						 Messages: 36 Registered: October 2007 
						
					 | 
					Member  | 
					 | 
		 
		 
	 | 
 
	
		| Quote: |   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(?)
  |  
  
 
This shows me that thinking twice is better... 
I agree. It's better to have the option to find out the previous focus. For my problem mouse- and keyhook will work. 
 
I will check the TreeCtrl next weekend. 
 
greetings 
loki
		
		
		
 |  
	| 
		
	 | 
 
 
 |   
Goto Forum:
 
 Current Time: Tue Nov 04 02:18:10 CET 2025 
 Total time taken to generate the page: 0.05005 seconds 
 |   
 |  
  |