——此文章摘自《Delphi 数据库开发经典案例解析》定价¥特价¥购买>>http://tracklinktechcn/?m_id=dangdang&a_id=A&l=&l_type= width= height= border= nosave> Button: TButton; Edit: TEdit; Edit: TEdit; Edit: TEdit; Button: TButton; ADOQuery: TADOQuery; ADOCommand: TADOCommand; Button: TButton; procedure FormCreate(Sender: TObject); procedure StringGridSelectCell(Sender: TObject; ACol ARow: Integer; var CanSelect: Boolean); procedure StringGridMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X Y: Integer); procedure ComboBoxSelect(Sender: TObject); procedure StringGridDblClick(Sender: TObject); procedure ComboBoxDropDown(Sender: TObject); procedure FormShow(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure ButtonClick(Sender: TObject); procedure ButtonClick(Sender: TObject); private { Private declarations } //设置选取的stringgrid单元成员的行列值为public以供其他窗体中调用 public currentRow: integer; currentCol:integer; { Public declarations } end; var output: Toutput; currentRow: integer; currentCol:integer; implementation uses FormInfo FormManage; {$R *dfm} //窗体创建时设置stringgrid的行列属性宽度等信息 //同时为业务员添加数据词典 procedure ToutputFormCreate(Sender: TObject); var ijnum:integer; begin //设置stringgrid行列名称 stringgridCols[]Add(序号); stringgridColWidths[]:=; stringgridCols[]Add(货号(双击)); stringgridColWidths[]:=; stringgridCols[]Add(品名); stringgridColWidths[]:=; stringgridCols[]Add(单位); stringgridColWidths[]:=; stringgridCols[]Add(数量); stringgridColWidths[]:=; stringgridCols[]Add(仓库); right>[http://developcsaicn/delphi/htm>] [] [http://developcsaicn/delphi/htm>] [http://developcsaicn/delphi/htm>] |