找回密码
 加入
搜索
查看: 3406|回复: 5

[GUI管理] 在GUICtrlCreateListViewItem中显示图片问题

  [复制链接]
发表于 2011-10-13 01:58:49 | 显示全部楼层 |阅读模式
请问各位大神 如何在GUICtrlCreateListViewItem这个控件 中一个图片,比如

在红框中显示,
代码为:
  1. $litem1 = GUICtrlCreateListViewItem ($t1&"|"&$t2&"|"&$t3&"|"&$t4&"|"&$t5&"|"&$t6&"|"&$t7,$List1)
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2011-10-13 03:42:16 | 显示全部楼层
试试可不可以把GUICtrlCreatePic这个控件加到Item控件里面
 楼主| 发表于 2011-10-13 06:13:16 | 显示全部楼层
试过楼上的方法,不行的,真是悲剧啊
发表于 2011-10-13 06:40:09 | 显示全部楼层
  1. #include <GuiConstantsEx.au3>
  2. #include <WinAPI.au3>
  3. #include <GuiListView.au3>
  4. #include <GuiImageList.au3>
  5. #include <WindowsConstants.au3>
  6. Local $listview, $hImage
  7. GUICreate("ListViewItem中显示图片演示", 400, 300)
  8. $listview = GUICtrlCreateListView("我的图片           |图片信息", 2, 2, 394, 268)
  9. GUISetState()
  10. ; 加载映像
  11. $hImage = _GUIImageList_Create(106, 66)
  12. _GUIImageList_AddBitmap($hImage, "1.bmp");放在脚本同一目录
  13. _GUIImageList_AddBitmap($hImage, "2.bmp");放在脚本同一目录
  14. _GUIImageList_AddBitmap($hImage, "3.bmp");如果要添加第三张图
  15. _GUICtrlListView_SetImageList($listview, $hImage, 1)
  16. ; 添加项目
  17. _GUICtrlListView_AddItem($listview, "", 0, 1)
  18. _GUICtrlListView_AddSubItem($listview, 0, '风景如画', 1, 1)
  19. _GUICtrlListView_AddItem($listview, "", 1, 2)
  20. _GUICtrlListView_AddSubItem($listview, 1, "随意说说", 1, 1)
  21. ;_GUICtrlListView_AddItem($listview, "", 2, 2);如果要添加第三张图
  22. ;_GUICtrlListView_AddSubItem($listview, 2, "随意说说", 1, 1);如果要添加第三张图

  23. Do
  24. Until GUIGetMsg() = $GUI_EVENT_CLOSE
  25. GUIDelete()
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2011-10-13 06:41:46 | 显示全部楼层
回复 3# xtgss007


   参考UDF: GuiImageList
 楼主| 发表于 2011-10-13 15:17:31 | 显示全部楼层
autoit3CN 发表于 2011-10-13 06:40



    谢谢  autoit3CN  , 如果是其它格式,比如gif,jpg等格式该如何来实现 ?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2026-9-20 23:35 , Processed in 0.064565 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表