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 41 by tony, Sat Jul 16 12:25:48 2016 UTC vs.
Revision 408 by tony, Tue Dec 13 22:37:43 2022 UTC

# Line 33 | Line 33 | interface
33   uses
34    Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, DBGrids, DB,
35    IBSQLParser, Grids, IBLookupComboEditBox, LMessages, StdCtrls, ExtCtrls,
36 <  IBCustomDataSet;
36 >  IBCustomDataSet, LCLVersion;
37  
38   type
39    {
# Line 41 | Line 41 | type
41     - automatic resizing of selected columns to fill the available row length
42     - automatic positioning and sizing of a "totals" control, typically at the
43       column footer, on a per column basis.
44 <   - DataSet resorting on header row click, sorting the dataset by the selected column.
44 >   - DataSet re-sorting on header row click, sorting the dataset by the selected column.
45       A second click on the same header cell reversed the sort order.
46     - Reselection of the same row following resorting.
47     - A new cell editor that provides the same functionality as TIBLookupComboEditBox.
# Line 182 | Line 182 | end;
182      FOnSelectPanelEditor: TOnSelectPanelEditor;
183      FResizing: boolean;
184      FWeHaveFocus: boolean;
185    FHidingEditorPanel: boolean;
186    FAllowHide: boolean;
185      FMouseDown: boolean;
186      function ActiveControl: TControl;
187      procedure DoShowEditorPanel(Data: PtrInt);
# Line 198 | Line 196 | end;
196      procedure DoGridResize;
197      procedure DoEditorHide; override;
198      procedure DoEditorShow; override;
199 +    {$IF (LCL_FULLVERSION < 2030000)}
200      procedure DrawCellText(aCol,aRow: Integer; aRect: TRect; aState: TGridDrawState; aText: String); override;
201 +    {$ELSE}
202 +    procedure DrawCellText(aCol,aRow: Integer; aRect: TRect; aState: TGridDrawState; const aText: String); override;
203 +    {$IFEND}
204      Function  EditingAllowed(ACol : Integer = -1) : Boolean; override;
205      procedure EditorHide; override;
206      procedure IndicatorClicked(Button: TMouseButton; Shift:TShiftState); virtual;
# Line 311 | Line 313 | end;
313  
314   implementation
315  
316 < uses Math, IBQuery, LCLType, Variants;
316 > uses LCLType, Variants, EditBtn;
317  
318   { TIBGridControlLink }
319  
# Line 454 | Line 456 | begin
456      inherited DoEditorShow;
457   end;
458  
459 + {$IF LCL_FULLVERSION < 2030000}
460   procedure TDBDynamicGrid.DrawCellText(aCol, aRow: Integer; aRect: TRect;
461    aState: TGridDrawState; aText: String);
462 + {$ELSE}
463 + procedure TDBDynamicGrid.DrawCellText(aCol,aRow: Integer; aRect: TRect; aState: TGridDrawState; const aText: String);
464 + {$IFEND}
465   var Style: TTextStyle;
466      OldStyle: TTextStyle;
467   begin
# Line 568 | Line 574 | begin
574        Exit; {ignore these keys if we are in a  combobox}
575  
576      if (AControl <> nil) and (AControl is TCustomMemo)
577 <                         and (Key in [VK_RETURN,VK_UP,VK_DOWN]) then Exit; {Ignore Return in a CustomMemo}
577 >                         and (Key in [VK_RETURN,VK_UP,VK_DOWN]) then Exit; {Ignore keys in a CustomMemo}
578  
579      if (AControl <> nil) and (AControl is TCustomGrid)
580 <                         and (Key in [VK_RETURN,VK_UP,VK_DOWN,VK_TAB]) then Exit; {Ignore Return in a CustomMemo}
580 >                         and (Key in [VK_RETURN,VK_UP,VK_DOWN,VK_TAB]) then Exit; {Ignore keys in a Custom Grid}
581 >
582 >    if (AControl <> nil) and (AControl is TEBEdit) and (AControl.Owner is TDateEdit) then
583 >    begin
584 >      if (Key in [VK_LEFT,VK_RIGHT]) then Exit; {Ignore navigation keys}
585 >      if TDateEdit(AControl.Owner).DroppedDown and
586 >        (Key in [VK_RETURN,VK_UP,VK_DOWN,VK_ESCAPE]) then Exit; {Ignore TCalender navigation keys in a Data edit}
587 >    end;
588  
589      if assigned(FOnKeyDownHander) then
590        OnKeyDownHander(Sender,Key,Shift,Done);
# Line 993 | Line 1006 | end;
1006   destructor TIBDynamicGridColumn.Destroy;
1007   begin
1008    if assigned(FDBLookupProperties) then FDBLookupProperties.Free;
1009 +  Application.RemoveAsyncCalls(self);
1010    inherited Destroy;
1011   end;
1012  
# Line 1285 | Line 1299 | begin
1299    if assigned(FIBControlLink) then FIBControlLink.Free;
1300    if assigned(FIndexFieldsList) then FIndexFieldsList.Free;
1301    if assigned(FDBLookupCellEditor) then FDBLookupCellEditor.Free;
1302 +  Application.RemoveAsyncCalls(self);
1303    inherited Destroy;
1304   end;
1305  

Comparing ibx/trunk/ibcontrols/IBDynamicGrid.pas (property svn:eol-style):
Revision 41 by tony, Sat Jul 16 12:25:48 2016 UTC vs.
Revision 408 by tony, Tue Dec 13 22:37:43 2022 UTC

# Line 0 | Line 1
1 + native

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines