如在的delphi中gride中加入下拉框,等等就象pb那样?

borlandsoftware 2001-12-31 10:52:24
...全文
85 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
chen_weiping 2001-12-31
  • 打赏
  • 举报
回复
//在窗体上任意放置dbgrid(strgrid)和dbcombobox1(combobox1)
procedure TForm1.DBGrid1DrawDataCell(Sender: TObject; const Rect: TRect;
Field: TField; State: TGridDrawState);
begin
if (gdfocused in state) then
begin
begin
DBCombobox1.Left := Rect.Left + DBGrid1.Left;
DBCombobox1.Top := Rect.Top + DBGrid1.top;
DBCombobox1.Width := Rect.Right - Rect.Left;
DBCombobox1.Height := Rect.Bottom - Rect.Top;
DBCombobox1.Visible := True;
end;
end;
bluetooth_2001 2001-12-31
  • 打赏
  • 举报
回复
加入column后,选择
设置DBGrid.column[n].PickList属性
Snakeguo 2001-12-31
  • 打赏
  • 举报
回复
设置DBGrid的PickList属性
arrow_gx 2001-12-31
  • 打赏
  • 举报
回复
onGetText 是显示

onSetText是实际数字
kofxdm 2001-12-31
  • 打赏
  • 举报
回复
>> 使用Picklist须注意,要用onGetText和onSetText来存储和显示数据!
楼上的,给个例子看看。
shiboq 2001-12-31
  • 打赏
  • 举报
回复
使用Picklist须注意,要用onGetText和onSetText来存储和显示数据!

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧