社区
C++ Builder
帖子详情
怎么使动态添加的ToolButton在ToolBar已有按键的后面??
COKING
2004-07-03 03:10:15
哎!越来越搞不懂了!!!
...全文
83
2
打赏
收藏
怎么使动态添加的ToolButton在ToolBar已有按键的后面??
哎!越来越搞不懂了!!!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
sczyq
2004-07-03
打赏
举报
回复
int ButtonLeft = 0;
for (int i=0; i<SysToolBar->ControlCount;i++)
if (ButtonLeft <= SysToolBar->Controls[i]->Left)
ButtonLeft = SysToolBar->Controls[i]->Left
+ SysToolBar->Controls[i]->Width;
TSpeedButton *NewButton = new TSpeedButton(this);
NewButton ->Parent = SysToolBar;
NewButton ->Top = 2;
NewButton ->Left = ButtonLeft + 1; // 至少加1
jishiping
2004-07-03
打赏
举报
回复
void __fastcall TForm1::Button1Click(TObject *Sender)
{
TToolButton* Btn = new TToolButton(this);
if (ToolBar1->ButtonCount > 0) {
TToolButton* Btn0 = ToolBar1->Buttons[
ToolBar1->ButtonCount-1];
Btn->Left = Btn0->Left + Btn0->Width;
Btn->Top = Btn0->Top;
}
Btn->Parent = ToolBar1;
//这儿加上 Btn 的其它设定
}
Qt之Q
Tool
Button
详细描述 Q
Tool
Button
类提供一个快速访问按钮来控制或选择,通常被用于...在通过Q
Tool
Bar
::addAction创建新的QAction实例或
添加
已有
的action到
tool
bar
中时会创建
Tool
btn。也可以像其他控件一样构造一个
tool
bt...
Hello Qt(七)——QT按钮组件
QPush
Button
组件用于接受用户点击事件,能够显示提示字符串,是功能性组件,需要父组件作为容器,能够在父组件中进行定位,用于执行命令或触发事件。 QPush
Button
的类继承如下: QPush
Button
:public ...
【COM编程】如何往IE工具条
添加
按钮
问题提出: 金山词霸、网络蚂蚁等软件安装后会向...从IE5开始便允许我们向工具栏
添加
自己的按钮,其本质就是修改注册表,
添加
创建此按钮所需的信息。实现步骤:1.创建此按钮的GUID(globally unique identifier) ...
vc经验
1
tool
bar
默认位图左上角那个点的颜色是透明色,不喜欢的话可以自己改。2 VC++中 WM_QUERYENDSESSION WM_ENDSESSION 为系统关机消息。3 Java学习书推荐:《java编程思想》4 在VC下执行DOS命令 a. ...
QT学习笔记(系统完整版)
常用控件 _按钮组 push
button
(可以显示图标)、
tool
button
(工具按钮 ,可以显示图标)、radio
button
(单选按钮)、checkbox(复选按钮)QMainWindow 提供主窗口程序 包括菜单栏 工具栏 锚接部件 状态栏 中心部件。...
C++ Builder
13,825
社区成员
102,679
社区内容
发帖
与我相关
我的任务
C++ Builder
C++ Builder相关内容讨论区
复制链接
扫一扫
分享
社区描述
C++ Builder相关内容讨论区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章