社区
C#
帖子详情
当IamgeList大小改变之后,ToolBar里的图片显不出来了
依然白板
2006-10-05 10:06:49
ToolBar使用了一个ImageList里的图片.然后我在程序中动态的改变了ImageList的图片SIZE,接着```ToolBar的图看就看不到了`````
用了toolBar.Refresh(),没用.
...全文
191
3
打赏
收藏
当IamgeList大小改变之后,ToolBar里的图片显不出来了
ToolBar使用了一个ImageList里的图片.然后我在程序中动态的改变了ImageList的图片SIZE,接着```ToolBar的图看就看不到了````` 用了toolBar.Refresh(),没用.
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
依然白板
2006-10-05
打赏
举报
回复
this.imageList1.ImageSize =new System.Drawing.Size(this.toolButtonWidth,this.toolButtonHeight);
this.toolBar1.Left = this.toolBarLeft;
this.toolBar1.Top = this.toolBarTop;
this.toolBar1.Width = this.toolButtonWidth*13+116;
this.toolBar1.Height = this.toolButtonHeight+10;
this.toolBar1.ImageList = this.imageList1;
this.toolBar1.Buttons[0].ImageIndex = 0;
this.toolBar1.Buttons[1].ImageIndex = 1;
this.toolBar1.Buttons[3].ImageIndex = 2;
this.toolBar1.Buttons[4].ImageIndex = 3;
this.toolBar1.Buttons[6].ImageIndex = 4;
this.toolBar1.Buttons[7].ImageIndex = 5;
this.toolBar1.Buttons[9].ImageIndex = 6;
this.toolBar1.Buttons[10].ImageIndex = 7;
this.toolBar1.Buttons[11].ImageIndex = 8;
this.toolBar1.Buttons[12].ImageIndex = 9;
this.toolBar1.Buttons[13].ImageIndex = 10;
this.toolBar1.Buttons[14].ImageIndex = 11;
this.toolBar1.Buttons[15].ImageIndex = 12;
这是我的代码``漏写了什么?
feiyun0112
2006-10-05
打赏
举报
回复
重新设置ToolBar的ImageList属性
*****************************************************************************
欢迎使用CSDN论坛阅读器 : CSDN Reader(附全部源代码)
http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
superliu1122
2006-10-05
打赏
举报
回复
在将图像添加到图像集合之前设置 ImageSize 属性,会导致将图像调整到指定的图像大小。
当将 ImageSize 属性设置为新值时,将重新创建图像列表的 Handle。
因为设置 ImageSize 属性会导致重新创建句柄,所以应在设置 Images 属性之前设置 ImageSize。如果在设置 Images 属性之后,在代码中设置 ColorDepth 或 ImageSize 属性,将会导致删除为 Images 属性设置的图像集合。
Toolbar
自定义样式
自定义
toolbar
样式,
改变
title、菜单的文字颜色、
大小
ToolBar
的封装
ToolBar
的封装,使代码步重复,快捷开发
AppBarLayout实现上滑隐藏
ToolBar
AppBarLayout实现上滑隐藏
ToolBar
,下滑出现
GoogleX工具条
根据mouseover和mouseout,
改变
图标
大小
的工具栏
AppBarLayout结合CoordinateLayout
AppBarLayout结合CoordinateLayout和
Toolbar
以及Collapsing
Toolbar
Layout
C#
110,533
社区成员
642,574
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章