亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
精品影院一区二区久久久| 伊人婷婷欧美激情| 国产一区二区三区在线观看免费 | 欧美高清激情brazzers| 亚洲黄色片在线观看| 欧美日韩夫妻久久| 美国精品在线观看| 国产欧美日韩在线视频| 不卡视频在线看| 一区二区三区 在线观看视频| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 又紧又大又爽精品一区二区| 色激情天天射综合网| 日韩国产欧美视频| 久久久99精品久久| 色女孩综合影院| 男人的天堂亚洲一区| 久久精品一区二区| 在线观看91精品国产入口| 轻轻草成人在线| 中文一区二区在线观看| 精品视频1区2区| 国产伦精一区二区三区| 亚洲人成7777| 精品奇米国产一区二区三区| 99re亚洲国产精品| 日本三级亚洲精品| 亚洲三级电影网站| 日韩免费高清av| 91视频xxxx| 激情伊人五月天久久综合| 《视频一区视频二区| 欧美精品三级在线观看| 成人av网址在线观看| 日本一区中文字幕| 亚洲精选视频免费看| 精品久久人人做人人爱| 在线观看日产精品| 成人福利视频网站| 久久爱www久久做| 亚洲高清免费一级二级三级| 国产清纯美女被跳蛋高潮一区二区久久w | www.亚洲国产| 亚洲一区欧美一区| 国产精品黄色在线观看| 日韩区在线观看| 欧美午夜一区二区| 91网址在线看| 国产不卡视频在线播放| 奇米精品一区二区三区在线观看一 | 欧美图片一区二区三区| 成人丝袜高跟foot| 国产一区 二区| 免费成人美女在线观看.| 亚洲永久免费av| 亚洲欧美日韩在线播放| 国产精品亲子乱子伦xxxx裸| 久久综合国产精品| 欧美成人一区二区| 91精品国产品国语在线不卡| 在线一区二区视频| 91美女在线视频| 91在线观看美女| 成人av午夜影院| 成人性色生活片| 成人av影院在线| 丁香六月久久综合狠狠色| 国产精品一线二线三线| 国产麻豆成人传媒免费观看| 韩国成人福利片在线播放| 久久er99热精品一区二区| 蜜桃视频一区二区三区| 蜜臀av一区二区在线免费观看 | 美女视频一区在线观看| 性久久久久久久久| 亚洲大片免费看| 日韩精品久久久久久| 日本不卡1234视频| 蜜臂av日日欢夜夜爽一区| 蜜桃传媒麻豆第一区在线观看| 麻豆成人在线观看| 精品一区二区三区香蕉蜜桃| 精品在线免费观看| 国产精品一二三四区| 成年人午夜久久久| 色狠狠av一区二区三区| 欧美日韩国产三级| 日韩欧美一级在线播放| www国产精品av| 亚洲国产经典视频| 亚洲日本丝袜连裤袜办公室| 亚洲国产三级在线| 秋霞午夜av一区二区三区| 精品一区精品二区高清| 成人激情午夜影院| 欧美优质美女网站| 91精品国产综合久久精品性色| 精品国产sm最大网站| 欧美韩日一区二区三区| 一区二区三区欧美激情| 日韩电影在线一区二区三区| 国产一区二区三区在线观看免费视频| 国产成人无遮挡在线视频| 91同城在线观看| 在线播放/欧美激情| 视频一区二区不卡| 日本中文字幕一区| 国产裸体歌舞团一区二区| 91在线视频免费观看| 欧美日韩成人综合天天影院 | 91网站最新网址| 欧美日韩国产首页| 久久久久久久久岛国免费| 成人免费一区二区三区视频 | 久久在线观看免费| 国产精品福利av| 日韩精品乱码av一区二区| 国产成人高清视频| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 欧美一区二区免费观在线| 国产精品女主播av| 日韩高清一区在线| www.久久精品| 欧美mv日韩mv| 亚洲国产日韩精品| 成人在线一区二区三区| 欧美日韩成人激情| 日韩理论电影院| 狠狠色丁香久久婷婷综合_中 | 9色porny自拍视频一区二区| 欧美日韩国产欧美日美国产精品| 久久久99免费| 日韩国产高清在线| 99久精品国产| 国产日韩亚洲欧美综合| 男人操女人的视频在线观看欧美| 91免费国产视频网站| 精品成人佐山爱一区二区| 亚洲v精品v日韩v欧美v专区| 成人亚洲精品久久久久软件| 日韩欧美国产精品一区| 亚洲国产综合人成综合网站| 成人av集中营| 久久久不卡网国产精品一区| 免费在线观看精品| 欧美影院午夜播放| 中文字幕不卡的av| 国产一区二区三区视频在线播放| 欧美一区二区在线不卡| 亚洲国产精品人人做人人爽| 9i看片成人免费高清| 国产欧美视频一区二区三区| 久88久久88久久久| 欧美一级精品大片| 亚洲韩国精品一区| 欧美日韩中文一区| 亚洲午夜激情av| 91丨porny丨首页| 国产精品久久久久影院色老大| 国产盗摄女厕一区二区三区| 精品久久久久av影院| 免费在线观看不卡| 日韩欧美精品三级| 精品一区二区三区免费观看| 日韩久久免费av| 久久99精品国产91久久来源| 日韩一本二本av| 日韩和欧美的一区| 日韩一区二区三区精品视频| 免费在线视频一区| 26uuu亚洲| 国产1区2区3区精品美女| 欧美激情在线一区二区三区| 成+人+亚洲+综合天堂| 亚洲欧美一区二区不卡| 色婷婷精品久久二区二区蜜臂av | 亚洲综合成人在线视频| 欧美在线观看视频在线| 天天亚洲美女在线视频| 欧美一级欧美一级在线播放| 久久www免费人成看片高清| 久久久久久97三级| eeuss国产一区二区三区| 亚洲激情网站免费观看| 欧美日韩精品一区二区三区| 麻豆精品精品国产自在97香蕉| 久久影院电视剧免费观看| 国产成人在线网站| 亚洲日本欧美天堂| 欧美日韩国产在线播放网站| 久久99精品一区二区三区| 日本一区二区三区久久久久久久久不 | 亚洲精品国产品国语在线app| 色美美综合视频| 麻豆久久一区二区| 欧美国产精品v| 欧美中文一区二区三区| 久久99热这里只有精品| 亚洲欧洲日韩av| 欧美精品xxxxbbbb|