ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/ibcontrols/IBDynamicGrid.pas
(Generate patch)

Comparing ibx/trunk/ibcontrols/IBDynamicGrid.pas (file contents):
Revision 48 by tony, Tue Dec 6 10:33:46 2016 UTC vs.
Revision 49 by tony, Thu Feb 2 16:20:12 2017 UTC

# Line 568 | Line 568 | begin
568        Exit; {ignore these keys if we are in a  combobox}
569  
570      if (AControl <> nil) and (AControl is TCustomMemo)
571 <                         and (Key in [VK_RETURN,VK_UP,VK_DOWN]) then Exit; {Ignore Return in a CustomMemo}
571 >                         and (Key in [VK_RETURN,VK_UP,VK_DOWN]) then Exit; {Ignore keys in a CustomMemo}
572  
573      if (AControl <> nil) and (AControl is TCustomGrid)
574 <                         and (Key in [VK_RETURN,VK_UP,VK_DOWN,VK_TAB]) then Exit; {Ignore Return in a Custom Grid}
574 >                         and (Key in [VK_RETURN,VK_UP,VK_DOWN,VK_TAB]) then Exit; {Ignore keys in a Custom Grid}
575  
576 <    if (AControl <> nil) and ((AControl is TDateEdit) or (AControl is TEBEdit))
577 <                         and (Key in [VK_RETURN,VK_UP,VK_DOWN,
578 <                               VK_ESCAPE,VK_LEFT,VK_RIGHT]) then Exit; {Ignore Return in a Data edit}
576 >    if (AControl <> nil) and (AControl is TEBEdit) and (AControl.Owner is TDateEdit) then
577 >    begin
578 >      if (Key in [VK_LEFT,VK_RIGHT]) then Exit; {Ignore navigation keys}
579 >      if TDateEdit(AControl.Owner).DroppedDown and
580 >        (Key in [VK_RETURN,VK_UP,VK_DOWN,VK_ESCAPE]) then Exit; {Ignore TCalender navigation keys in a Data edit}
581 >    end;
582  
583      if assigned(FOnKeyDownHander) then
584        OnKeyDownHander(Sender,Key,Shift,Done);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines