在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
listbox实现以下效果: \
关键代码,采用数据集的方式 type PpatientData=^RpatientData; RpatientData= record patient_id:string; admiss_times:Integer; inpatient_no:string; name:string; sex:string; bed_no:string; nurse_level:string; diag:string; end; var item:TMetropolisUIListBoxItem; p:PpatientData; begin with cdspatientlist do begin DisableControls; try First; while not Eof do begin New(p); p.patient_id:=FieldByName('inpatient_no').AsString; p.admiss_times:=1; p.inpatient_no:=FieldByName('inpatient_no').AsString; p.bed_no:=FieldByName('inpatient_no').AsString+'床'; p.nurse_level:=FieldByName('nurse_level').AsString; p.diag:=FieldByName('diag').AsString; p.name:= FieldByName('name').AsString; p.sex:=FieldByName('sex').AsString; item:=TMetropolisUIListBoxItem.Create(ListBoxPatient); item.Font.Size:=14; item.Title:='姓名:'+p.name+'-'+' 性别:'+p.sex; item.SubTitle:=p.bed_no+' 护理:'+p.nurse_level; item.Description:='诊断:'+p.diag ; if p.sex='女' then item.Icon.Assign(Image1.MultiResBitmap.Items[0].Bitmap) else item.Icon.Assign(Image1.MultiResBitmap.Items[1].Bitmap); ListBoxPatient.AddObject(item); Next; end; finally EnableControls; end; end;
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论