buzz44 Posted June 14, 2005 Share Posted June 14, 2005 (edited) When I use GUICtrlSetImage ($listview, "blah.bmp") or GUICtrlSetImage ($listviewitem, "blah.bmp") without using GUICtrlSetImage() on a list view again, it sets all the items with the same image. Is this correct behavour?Different/Same problem below.Using this example...#include <GUIConstants.au3> GUICreate("listview items",220,250, 100,200) $listview = GuiCtrlCreateListView ("col1 |col2|col3 ",10,10,200,150);,$LVS_SORTDESCENDING) $item1=GuiCtrlCreateListViewItem("item1|col2|col3",$listview) $item2=GuiCtrlCreateListViewItem("item2|col2|col3",$listview) $item3=GuiCtrlCreateListViewItem("item3|col2|col3",$listview) $item4=GuiCtrlCreateListViewItem("item4|col2|col3",$listview) $item5=GuiCtrlCreateListViewItem("item5|col2|col3",$listview) $item6=GuiCtrlCreateListViewItem("item6|col2|col3",$listview) GuiSetState() GUICtrlSetImage ($item2, "Blah.bmp") GUICtrlSetImage ($item3, "Blah22.bmp"); Comment line to show first problem Do $msg = GuiGetMsg () Until $msg = $GUI_EVENT_CLOSEItem 2's image is set first. Meaning all the items have the same image. Then Item 3's image is set and all the images remain the same except item 3, where it is set to the correct image.Is this normal?Btw great work on this, I have been waiting for AutoIt to support images in ListView's . Any chance of being able to change the image size? or thumbnails etc, such as in 'Explorer'.Edit: Due to the new updated GUICtrlSetColor() and GUICtrlSetBkColor() will _GUICtrlListViewSetBkColor() and _GUICtrlListViewSetTextColor() beremoved? Edited June 14, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted June 14, 2005 Share Posted June 14, 2005 hmm, when running your script, after creating the opbove pictures, mine ain't seem to put on any icons at all Link to comment Share on other sites More sharing options...
buzz44 Posted June 14, 2005 Author Share Posted June 14, 2005 (edited) Are using the latest beta, 3.1.1.47?Edit: And the images have to be located in the script dir, unless you give the full path. Edited June 14, 2005 by Burrup qq Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted June 14, 2005 Share Posted June 14, 2005 Are using the latest beta, 3.1.1.47?Edit: And the images have to be located in the script dir, unless you give the full path.<{POST_SNAPBACK}>yes im running .47 and tried both script dir and full path, non worked:S Link to comment Share on other sites More sharing options...
GaryFrost Posted June 14, 2005 Share Posted June 14, 2005 When I use GUICtrlSetImage ($listview, "blah.bmp") or GUICtrlSetImage ($listviewitem, "blah.bmp") without using GUICtrlSetImage() on a list view again, it sets all the items with the same image. Is this correct behavour?Different/Same problem below.Using this example...#include <GUIConstants.au3> GUICreate("listview items",220,250, 100,200) $listview = GuiCtrlCreateListView ("col1 |col2|col3 ",10,10,200,150);,$LVS_SORTDESCENDING) $item1=GuiCtrlCreateListViewItem("item1|col2|col3",$listview) $item2=GuiCtrlCreateListViewItem("item2|col2|col3",$listview) $item3=GuiCtrlCreateListViewItem("item3|col2|col3",$listview) $item4=GuiCtrlCreateListViewItem("item4|col2|col3",$listview) $item5=GuiCtrlCreateListViewItem("item5|col2|col3",$listview) $item6=GuiCtrlCreateListViewItem("item6|col2|col3",$listview) GuiSetState() GUICtrlSetImage ($item2, "Blah.bmp") GUICtrlSetImage ($item3, "Blah22.bmp"); Comment line to show first problem Do $msg = GuiGetMsg () Until $msg = $GUI_EVENT_CLOSEItem 2's image is set first. Meaning all the items have the same image. Then Item 3's image is set and all the images remain the same except item 3, where it is set to the correct image.Is this normal?Btw great work on this, I have been waiting for AutoIt to support images in ListView's . Any chance of being able to change the image size? or thumbnails etc, such as in 'Explorer'.Edit: Due to the new updated GUICtrlSetColor() and GUICtrlSetBkColor() will _GUICtrlListViewSetBkColor() and _GUICtrlListViewSetTextColor() beremoved?<{POST_SNAPBACK}>There are 3 different parts for setting colorDoes GUICtrlSetBkColor also set the text back color for listview? SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Holger Posted June 14, 2005 Share Posted June 14, 2005 Hi ok, try to answer some things and maybe I will extend the command-descriptions in the helpfile...if I find the time... @Burrup: it's the same behaviour like on the TreeView: If you first set an icon for listview or listviewitem then this icon will be used for all icons automatically. At the moment the ListView supports only the "report"-view. @Wb-FreeKill: tested again here (XPSP1): OK , also tested yesterday again with 95/98/NT4/2000 and XPSP2. @gafrost: at the moment are only supported setting color on a _ListView_ not the items itself explicitely. So maybe we can implement this but the problem is when you set the textbkcolor for an item it must also be called by "GUICtrlSetBkColor". We have 2 commands but 3 possibilities So back to your question: yes, the text background color is also be set. So long... Holger Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
GaryFrost Posted June 14, 2005 Share Posted June 14, 2005 Hi ok, try to answer some things and maybe I will extend the command-descriptions in the helpfile...if I find the time...@Burrup: it's the same behaviour like on the TreeView:If you first set an icon for listview or listviewitem then this icon will be used for all icons automatically.At the moment the ListView supports only the "report"-view.@Wb-FreeKill: tested again here (XPSP1): OK , also tested yesterday again with 95/98/NT4/2000 and XPSP2.@gafrost: at the moment are only supported setting color on a _ListView_ not the items itself explicitely.So maybe we can implement this but the problem is when you set the textbkcolor for an item it must also be called by "GUICtrlSetBkColor".We have 2 commands but 3 possibilities So back to your question: yes, the text background color is also be set.So long...Holger<{POST_SNAPBACK}>Thanks, figured that's the way you handle the back color, almost did that myself with the UDF's.@Burrup, more than likely the 3 UDF's for Listview color will be removed seeing as how this hasn't made it to release. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
buzz44 Posted June 14, 2005 Author Share Posted June 14, 2005 Thanks all. I was unsure as I haven't had much experience with TreeViews. qq Link to comment Share on other sites More sharing options...
jpm Posted June 14, 2005 Share Posted June 14, 2005 Thanks all. I was unsure as I haven't had much experience with TreeViews.<{POST_SNAPBACK}>So don't use the "v3 bug reports"" forum when you are not for sure it is a bug The "V3 support" is the correct forum and after when you are for sure gwrite in the bug oneThanks Link to comment Share on other sites More sharing options...
therks Posted June 17, 2005 Share Posted June 17, 2005 It still doesn't work for me. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
jpm Posted June 17, 2005 Share Posted June 17, 2005 It still doesn't work for me.<{POST_SNAPBACK}>Can you post a script that reproduce what you experience?I am confuse of what is the real problem. :"> Thanks Link to comment Share on other sites More sharing options...
therks Posted June 19, 2005 Share Posted June 19, 2005 Sorry JP, I hadn't updated the AutoIt3.exe yet. It had been running when I extracted the .zip archive and I didn't realize, so it hadn't been able to overwrite with the new version. All my documenation was up to date, but not the .exe itself. I was actually running .46 (as I was creating the example script, I put @AutoItVersion in the window title.. then I tested it and started to smack myself). My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now