摘要: 1. 在数据集已经打开的情况下才使用DBLookupComboBox1.ListFieldIndex:=0的。2.listfieldindex是你的DBLookupComboBox1在列出的字段中选择一个作为索引。比如你列了2个,0就是将第一个作为索引。 真正实现默认值是: DBLookupComboBox1.KeyValue:=你自己的值;3.dblookupcombobox1.KeyValue:=ADOquery1.fieldbyname( 'username ').AsVariant; 阅读全文
posted @ 2012-05-29 20:00 yoogoo 阅读(1943) 评论(0) 推荐(0) 编辑
摘要: TListView 可以帮你实现。1. 在界面添加TListView 控件 ListView1,设置 ListView1.viewStype:=vsReport。或等于vsList。 ListView1.checkboxes:=True;2. 可以把数据加载到 ListView1中。 ListView1.Items.Clear; ListView1.Items.BeginUpdate; for i:=1 to 10 do begin vLvItem := lv1.Items.Add; vLvItem.Caption:='aa'+ IntToStr(i) ; vLvItem.Su 阅读全文
posted @ 2012-05-29 19:24 yoogoo 阅读(490) 评论(0) 推荐(0) 编辑
摘要: 1.把DBGRID的第一列更变内容显示 if Column.FieldName= 'OPERATORID' then if DataCol = 0 then begin DBGrid2.Canvas.TextRect(Rect, Rect.Left + 2, Rect.Top + 2, IntToStr(i)); inc(i); end;//I:显示了其顺序号。如:procedure TfrmDetail01.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: T 阅读全文
posted @ 2012-05-29 15:39 yoogoo 阅读(331) 评论(0) 推荐(0) 编辑