如何在工具栏上放一个ComboBox?

Qcj 2000-08-16 10:55:00
...全文
163 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
Michaelyfj 2000-08-17
  • 打赏
  • 举报
回复
toolbar更简单,只要设置R的值即可,如
R := Rect;
with ComboBox1 do
begin
Parent := ToolBar1;
SetBounds(R.left, R.Top, r.Right-R.Left, R.Bottom-R.Top);
end;
torent 2000-08-17
  • 打赏
  • 举报
回复
直接放,没错的。
zsr 2000-08-17
  • 打赏
  • 举报
回复
可以直接将其放到工具条上。
shylsz 2000-08-16
  • 打赏
  • 举报
回复
toolbar中的toolbotton的style中就有tbsdropdown属性啊
Michaelyfj 2000-08-16
  • 打赏
  • 举报
回复
第4步应该是OnDrawPanel事件,sorry
Michaelyfj 2000-08-16
  • 打赏
  • 举报
回复
很简单
1、定义本单元全局变量:R : TRect;
2、设置TStatusBar中的某一Panels为OwnerDraw
3、在Form上添加ComboBox1构件
4、在TStatusBar的OnOwnerDraw事件中加入
R := Rect;
with ComboBox1 do
begin
Parent := StautsBar1;
SetBounds(R.left, R.Top, r.Right-R.Left, R.Bottom-R.Top);
end;
5、如果可以实现,别忘了...

5,379

社区成员

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

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