亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? tntdbgrids.pas

?? TNT Components Source
?? PAS
?? 第 1 頁 / 共 3 頁
字號:

{*****************************************************************************}
{                                                                             }
{    Tnt Delphi Unicode Controls                                              }
{      http://www.tntware.com/delphicontrols/unicode/                         }
{        Version: 2.3.0                                                       }
{                                                                             }
{    Copyright (c) 2002-2007, Troy Wolbrink (troy.wolbrink@tntware.com)       }
{                                                                             }
{*****************************************************************************}

unit TntDBGrids;

{$INCLUDE TntCompilers.inc}

interface

uses
  Classes, TntClasses, Controls, Windows, Grids, DBGrids, Messages, DBCtrls, DB, TntStdCtrls;

type
{TNT-WARN TColumnTitle}
  TTntColumnTitle = class(TColumnTitle{TNT-ALLOW TColumnTitle})
  private
    FCaption: WideString;
    procedure SetInheritedCaption(const Value: AnsiString);
    function GetCaption: WideString;
    procedure SetCaption(const Value: WideString);
    function IsCaptionStored: Boolean;
  protected
    procedure DefineProperties(Filer: TFiler); override;
  public
    procedure Assign(Source: TPersistent); override;
    procedure RestoreDefaults; override;
    function DefaultCaption: WideString;
  published
    property Caption: WideString read GetCaption write SetCaption stored IsCaptionStored;
  end;

{TNT-WARN TColumn}
type
  TTntColumn = class(TColumn{TNT-ALLOW TColumn})
  private
    FWidePickList: TTntStrings;
    function GetWidePickList: TTntStrings;
    procedure SetWidePickList(const Value: TTntStrings);
    procedure HandlePickListChange(Sender: TObject);
    function GetTitle: TTntColumnTitle;
    procedure SetTitle(const Value: TTntColumnTitle);
  protected
    procedure DefineProperties(Filer: TFiler); override;
    function  CreateTitle: TColumnTitle{TNT-ALLOW TColumnTitle}; override;
  public
    destructor Destroy; override;
    property WidePickList: TTntStrings read GetWidePickList write SetWidePickList;
  published
{TNT-WARN PickList}
    property PickList{TNT-ALLOW PickList}: TTntStrings read GetWidePickList write SetWidePickList;
    property Title: TTntColumnTitle read GetTitle write SetTitle;
  end;

  { TDBGridInplaceEdit adds support for a button on the in-place editor,
    which can be used to drop down a table-based lookup list, a stringlist-based
    pick list, or (if button style is esEllipsis) fire the grid event
    OnEditButtonClick.  }

type
  TDBGridInplaceEdit{TNT-ALLOW TDBGridInplaceEdit} = class(TInplaceEditList)
  private
    {$IFDEF COMPILER_6} // verified against VCL source in Delphi 6 and BCB 6
    FDataList: TDBLookupListBox; // 1st field - Delphi/BCB 6 TCustomDBGrid assumes this
    FUseDataList: Boolean;       // 2nd field - Delphi/BCB 6 TCustomDBGrid assumes this
    {$ENDIF}
    {$IFDEF DELPHI_7}  // verified against VCL source in Delphi 7
    FDataList: TDBLookupListBox; // 1st field - Delphi 7 TCustomDBGrid assumes this
    FUseDataList: Boolean;       // 2nd field - Delphi 7 TCustomDBGrid assumes this
    {$ENDIF}
    {$IFDEF DELPHI_9} // verified against VCL source in Delphi 9
    FDataList: TDBLookupListBox; // 1st field - Delphi 9 TCustomDBGrid assumes this
    FUseDataList: Boolean;       // 2nd field - Delphi 9 TCustomDBGrid assumes this
    {$ENDIF}
    {$IFDEF DELPHI_10} // verified against VCL source in Delphi 10
    FDataList: TDBLookupListBox; // 1st field - Delphi 10 TCustomDBGrid assumes this
    FUseDataList: Boolean;       // 2nd field - Delphi 10 TCustomDBGrid assumes this
    {$ENDIF}
    FLookupSource: TDatasource;
    FWidePickListBox: TTntCustomListbox;
    function GetWidePickListBox: TTntCustomListbox;
  protected
    procedure CloseUp(Accept: Boolean); override;
    procedure DoEditButtonClick; override;
    procedure DropDown; override;
    procedure UpdateContents; override;
    property UseDataList: Boolean read FUseDataList;
  public
    constructor Create(Owner: TComponent); override;
    property DataList: TDBLookupListBox read FDataList;
    property WidePickListBox: TTntCustomListbox read GetWidePickListBox;
  end;

type
{TNT-WARN TDBGridInplaceEdit}
  TTntDBGridInplaceEdit = class(TDBGridInplaceEdit{TNT-ALLOW TDBGridInplaceEdit})
  private
    FInDblClick: Boolean;
    FBlockSetText: Boolean;
    procedure WMSetText(var Message: TWMSetText); message WM_SETTEXT;
  protected
    function GetText: WideString; virtual;
    procedure SetText(const Value: WideString); virtual;
  protected
    procedure CreateWindowHandle(const Params: TCreateParams); override;
    procedure UpdateContents; override;
    procedure DblClick; override;
  public
    property Text: WideString read GetText write SetText;
  end;

{TNT-WARN TDBGridColumns}
  TTntDBGridColumns = class(TDBGridColumns{TNT-ALLOW TDBGridColumns})
  private
    function GetColumn(Index: Integer): TTntColumn;
    procedure SetColumn(Index: Integer; const Value: TTntColumn);
  public
    function Add: TTntColumn;
    property Items[Index: Integer]: TTntColumn read GetColumn write SetColumn; default;
  end;

  TTntGridDataLink = class(TGridDataLink)
  private
    OriginalSetText: TFieldSetTextEvent;
    procedure GridUpdateFieldText(Sender: TField; const Text: AnsiString);
  protected
    procedure UpdateData; override;
    procedure RecordChanged(Field: TField); override;
  end;

{TNT-WARN TCustomDBGrid}
  TTntCustomDBGrid = class(TCustomDBGrid{TNT-ALLOW TCustomDBGrid})
  private
    FEditText: WideString;
    function GetHint: WideString;
    procedure SetHint(const Value: WideString);
    function IsHintStored: Boolean;
    procedure WMChar(var Msg: TWMChar); message WM_CHAR;
    function GetColumns: TTntDBGridColumns;
    procedure SetColumns(const Value: TTntDBGridColumns);
  protected
    procedure CreateWindowHandle(const Params: TCreateParams); override;
    procedure ShowEditorChar(Ch: WideChar); dynamic;
    procedure DefineProperties(Filer: TFiler); override;
    function GetActionLinkClass: TControlActionLinkClass; override;
    procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;
    function CreateColumns: TDBGridColumns{TNT-ALLOW TDBGridColumns}; override;
    property Columns: TTntDBGridColumns read GetColumns write SetColumns;
    function CreateEditor: TInplaceEdit{TNT-ALLOW TInplaceEdit}; override;
    function CreateDataLink: TGridDataLink; override;
    function GetEditText(ACol, ARow: Longint): WideString; reintroduce;
    procedure DrawCell(ACol, ARow: Integer; ARect: TRect; AState: TGridDrawState); override;
    procedure SetEditText(ACol, ARow: Longint; const Value: AnsiString); override;
  public
    procedure DefaultDrawColumnCell(const Rect: TRect; DataCol: Integer;
      Column: TTntColumn; State: TGridDrawState); dynamic;
    procedure DefaultDrawDataCell(const Rect: TRect; Field: TField;
      State: TGridDrawState);
  published
    property Hint: WideString read GetHint write SetHint stored IsHintStored;
  end;

{TNT-WARN TDBGrid}
  TTntDBGrid = class(TTntCustomDBGrid)
  public
    property Canvas;
    property SelectedRows;
  published
    property Align;
    property Anchors;
    property BiDiMode;
    property BorderStyle;
    property Color;
    property Columns stored False; //StoreColumns;
    property Constraints;
    property Ctl3D;
    property DataSource;
    property DefaultDrawing;
    property DragCursor;
    property DragKind;
    property DragMode;
    property Enabled;
    property FixedColor;
    property Font;
    property ImeMode;
    property ImeName;
    property Options;
    property ParentBiDiMode;
    property ParentColor;
    property ParentCtl3D;
    property ParentFont;
    property ParentShowHint;
    property PopupMenu;
    property ReadOnly;
    property ShowHint;
    property TabOrder;
    property TabStop;
    property TitleFont;
    property Visible;
    property OnCellClick;
    property OnColEnter;
    property OnColExit;
    property OnColumnMoved;
    property OnDrawDataCell;  { obsolete }
    property OnDrawColumnCell;
    property OnDblClick;
    property OnDragDrop;
    property OnDragOver;
    property OnEditButtonClick;
    property OnEndDock;
    property OnEndDrag;
    property OnEnter;
    property OnExit;
    property OnKeyDown;
    property OnKeyPress;
    property OnKeyUp;
    {$IFDEF COMPILER_9_UP}
    property OnMouseActivate;
    {$ENDIF}
    property OnMouseDown;
    {$IFDEF COMPILER_10_UP}
    property OnMouseEnter;
    property OnMouseLeave;
    {$ENDIF}
    property OnMouseMove;
    property OnMouseUp;
    property OnMouseWheel;
    property OnMouseWheelDown;
    property OnMouseWheelUp;
    property OnStartDock;
    property OnStartDrag;
    property OnTitleClick;
  end;

implementation

uses
  SysUtils, TntControls, Math, Variants, Forms,
  TntGraphics, Graphics, TntDB, TntActnList, TntSysUtils, TntWindows;

{ TTntColumnTitle }

procedure TTntColumnTitle.DefineProperties(Filer: TFiler);
begin
  inherited;
  TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;

function TTntColumnTitle.DefaultCaption: WideString;
var
  Field: TField;
begin
  Field := Column.Field;
  if Assigned(Field) then
    Result := Field.DisplayName
  else
    Result := Column.FieldName;
end;

function TTntColumnTitle.IsCaptionStored: Boolean;
begin
  Result := (cvTitleCaption in Column.AssignedValues) and
    (FCaption <> DefaultCaption);
end;

procedure TTntColumnTitle.SetInheritedCaption(const Value: AnsiString);
begin
  inherited Caption := Value;
end;

function TTntColumnTitle.GetCaption: WideString;
begin
  if cvTitleCaption in Column.AssignedValues then
    Result := GetSyncedWideString(FCaption, inherited Caption)
  else
    Result := DefaultCaption;
end;

procedure TTntColumnTitle.SetCaption(const Value: WideString);
begin
  if not (Column as TTntColumn).IsStored then
    inherited Caption := Value
  else begin
    if (cvTitleCaption in Column.AssignedValues) and (Value = FCaption) then Exit;
    SetSyncedWideString(Value, FCaption, inherited Caption, SetInheritedCaption);
  end;
end;

procedure TTntColumnTitle.Assign(Source: TPersistent);
begin
  inherited Assign(Source);
  if Source is TTntColumnTitle then
  begin
    if cvTitleCaption in TTntColumnTitle(Source).Column.AssignedValues then
      Caption := TTntColumnTitle(Source).Caption;
  end;
end;

procedure TTntColumnTitle.RestoreDefaults;
begin
  FCaption := '';
  inherited;
end;

{ TTntColumn }

procedure TTntColumn.DefineProperties(Filer: TFiler);
begin
  inherited;
  TntPersistent_AfterInherited_DefineProperties(Filer, Self);
end;

function TTntColumn.CreateTitle: TColumnTitle{TNT-ALLOW TColumnTitle};
begin
  Result := TTntColumnTitle.Create(Self);
end;

function TTntColumn.GetTitle: TTntColumnTitle;
begin
  Result := (inherited Title) as TTntColumnTitle;
end;

procedure TTntColumn.SetTitle(const Value: TTntColumnTitle);
begin
  inherited Title := Value;
end;

function TTntColumn.GetWidePickList: TTntStrings;
begin
  if FWidePickList = nil then begin
    FWidePickList := TTntStringList.Create;
    TTntStringList(FWidePickList).OnChange := HandlePickListChange;
  end;
  Result := FWidePickList;
end;

procedure TTntColumn.SetWidePickList(const Value: TTntStrings);
begin
  if Value = nil then
  begin
    FWidePickList.Free;
    FWidePickList := nil;
    (inherited PickList{TNT-ALLOW PickList}).Clear;
    Exit;
  end;
  WidePickList.Assign(Value);
end;

procedure TTntColumn.HandlePickListChange(Sender: TObject);
begin
  inherited PickList{TNT-ALLOW PickList}.Assign(WidePickList);
end;

destructor TTntColumn.Destroy;
begin
  inherited;
  FWidePickList.Free;
end;

{ TTntPopupListbox }
type
  TTntPopupListbox = class(TTntCustomListbox)
  private
    FSearchText: WideString;
    FSearchTickCount: Longint;
  protected
    procedure CreateParams(var Params: TCreateParams); override;
    procedure CreateWnd; override;
    procedure WMChar(var Message: TWMChar); message WM_CHAR;
    procedure KeyPressW(var Key: WideChar);
    procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
  end;

procedure TTntPopupListbox.CreateParams(var Params: TCreateParams);
begin
  inherited CreateParams(Params);
  with Params do
  begin
    Style := Style or WS_BORDER;
    ExStyle := WS_EX_TOOLWINDOW or WS_EX_TOPMOST;
    AddBiDiModeExStyle(ExStyle);
    WindowClass.Style := CS_SAVEBITS;
  end;
end;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美男女性生活在线直播观看| 国产成人在线电影| 日本成人在线网站| 久久精品国产一区二区三区免费看| 婷婷六月综合网| 日韩av一区二区在线影视| 狠狠色狠狠色综合系列| 国产精品99久久久久久有的能看| 国产精品一区二区久激情瑜伽| 国产精品亚洲а∨天堂免在线| 久久久亚洲午夜电影| 久久精品亚洲乱码伦伦中文| 蜜桃久久av一区| 日韩精品一区二区在线观看| 亚洲美女区一区| 成人免费视频一区二区| 欧美在线色视频| 中文字幕一区二区三区精华液 | 91福利视频久久久久| 成人av集中营| 欧美无人高清视频在线观看| 中文字幕综合网| 欧美自拍偷拍一区| 日本网站在线观看一区二区三区| av电影在线观看一区| 国产视频一区在线播放| 91精品欧美一区二区三区综合在 | 精品国产一区二区三区av性色| 欧美精品乱码久久久久久| 精品捆绑美女sm三区| 99久久精品免费看国产免费软件| 国产精品久久久久久久午夜片| 欧美国产成人精品| 欧美精品久久一区二区三区| 国产成人在线免费| 午夜精彩视频在线观看不卡| 国产三级精品三级在线专区| 欧美亚洲一区二区三区四区| 国产精品中文欧美| 日本亚洲最大的色成网站www| 国产精品电影一区二区| 日韩精品最新网址| 色呦呦一区二区三区| 国产乱人伦偷精品视频不卡| 午夜精品久久久久久久99樱桃| 久久精品人人做| 欧美一区午夜视频在线观看 | 日韩欧美另类在线| 在线视频你懂得一区| 国产精品伊人色| 五月天亚洲精品| 亚洲精品大片www| 国产精品天干天干在线综合| 日韩欧美黄色影院| 欧美日韩一区国产| 99精品偷自拍| 成人av集中营| 欧美福利一区二区| 日本不卡在线视频| 91精品国产综合久久小美女| 日韩av一区二区三区| 日韩欧美中文字幕制服| 久久精品久久综合| 国产欧美1区2区3区| 久久se精品一区精品二区| 欧美成人一区二区三区在线观看 | 中文字幕制服丝袜成人av| 国产98色在线|日韩| 亚洲五码中文字幕| 欧美成人女星排名| 成人深夜在线观看| 青青草国产精品亚洲专区无| 天天综合日日夜夜精品| 欧美一个色资源| 7777精品伊人久久久大香线蕉超级流畅| 日韩高清不卡一区二区| 欧美精品久久久久久久多人混战| 亚洲一卡二卡三卡四卡无卡久久| 国产传媒日韩欧美成人| 久久99精品久久久久| 91成人看片片| 黑人巨大精品欧美黑白配亚洲| 中文字幕视频一区| 中文字幕一区二区三区四区 | av成人动漫在线观看| 国产不卡在线播放| 成人精品一区二区三区四区| 91小视频在线观看| 在线亚洲+欧美+日本专区| 精品视频免费看| 欧美日本在线一区| 成人午夜又粗又硬又大| 日本欧美加勒比视频| 有坂深雪av一区二区精品| 国产喷白浆一区二区三区| 欧美va在线播放| 日韩亚洲欧美综合| 成人动漫一区二区三区| 男男视频亚洲欧美| 日韩国产在线观看一区| 香蕉加勒比综合久久| 亚洲欧洲中文日韩久久av乱码| 毛片不卡一区二区| 亚洲精品在线免费观看视频| 欧美自拍偷拍午夜视频| 精品视频在线视频| 欧美v亚洲v综合ⅴ国产v| 欧美国产综合色视频| 亚洲国产日韩a在线播放| 久久99精品一区二区三区| 成人av在线播放网站| 欧美亚洲国产怡红院影院| 日韩欧美国产系列| 最新欧美精品一区二区三区| 日本在线不卡一区| 成人综合在线观看| 欧美理论在线播放| 中文字幕av免费专区久久| 亚洲一区二区精品3399| 国产精品一区二区在线看| 在线观看av不卡| 久久久精品蜜桃| 亚洲午夜久久久久久久久电影网 | 国产麻豆精品视频| 成人97人人超碰人人99| 亚洲视频一区二区在线| 亚洲午夜视频在线观看| 国产在线精品一区二区夜色 | 美女看a上一区| 成人深夜视频在线观看| 8v天堂国产在线一区二区| 国产精品美女一区二区| 蜜芽一区二区三区| 欧美精品乱码久久久久久| av电影一区二区| 欧美v国产在线一区二区三区| 亚洲欧洲av在线| 国产精品香蕉一区二区三区| 欧美一区二区三区在线视频| 国产精品夫妻自拍| 欧美少妇性性性| 国产精品久久久久久久岛一牛影视| 亚洲国产成人av| 日本韩国一区二区三区视频| 久久久亚洲午夜电影| 国产精品一区二区无线| 久久综合色鬼综合色| 日韩av中文字幕一区二区三区 | 成人av影院在线| 欧美xxxx在线观看| 久久精品国产第一区二区三区| 欧美视频一区在线观看| 亚洲精品国产精华液| 在线观看www91| 亚洲国产欧美在线人成| 欧美日韩久久久久久| 一二三区精品视频| 欧美中文字幕一区二区三区| 亚洲国产精品自拍| 精品福利一二区| 91精品国产入口| 免费欧美高清视频| 欧美日韩免费电影| 日韩和欧美一区二区三区| 久久综合狠狠综合久久综合88| 免费人成在线不卡| 国产精品资源在线观看| 欧美日韩国产综合一区二区三区| 国产在线不卡一区| 国产a视频精品免费观看| 久久久www免费人成精品| 国产九色精品成人porny | 在线免费一区三区| 一区二区三区四区国产精品| 一本大道久久a久久综合 | 亚洲超碰精品一区二区| 制服丝袜亚洲播放| 久久免费看少妇高潮| 91成人在线精品| 国产自产2019最新不卡| 亚洲国产精品一区二区www| 欧美mv和日韩mv的网站| 欧美综合欧美视频| 丰满白嫩尤物一区二区| 午夜视黄欧洲亚洲| 国产精品三级久久久久三级| 欧美日韩国产天堂| 一道本成人在线| www.成人网.com| 大尺度一区二区| 国产精品一区专区| 国产专区欧美精品| 欧美aaaaa成人免费观看视频| 亚洲欧美一区二区三区久本道91 | 老司机一区二区| 一区在线观看视频| 国产精品女同互慰在线看| 精品捆绑美女sm三区| 久久午夜电影网| 精品久久久久久亚洲综合网|