Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl 'Key' modifications / questions  
	
		
		
			| GridCtrl 'Key' modifications / questions [message #10131] | 
			Thu, 21 June 2007 20:37   | 
		 
		
			
				
				
				
					
						  
						kcabobert
						 Messages: 51 Registered: January 2007  Location: USA
						
					 | 
					Member  | 
					 | 
		 
		 
	 | 
 
	
		I am hitting a variety of issues with GridCtrl not passing keys through to its parent.  For example, I often use <Esc> to cancel current form editing operations, or to close a window. 
 
I am thinking about adding 'IgnoreEsc(bool gnore)' to GridCtrl, then modifying the corresponding section of GridCtrl::Key(dword,int) to: 
  case K_ESCAPE:
    if ( !ignore_esc )
      if(HasCtrls())
      {
        CancelEdit();
        return true;
      }
    else
      return Ctrl::Key(key,count);
 
 
Is that a clean way to approach such modifications?  Should I rather derive a child, then adjust Key there?
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
  
 
Goto Forum:
 
 Current Time: Tue Nov 04 02:28:39 CET 2025 
 Total time taken to generate the page: 0.03887 seconds 
 |