AutoHotkey Community

It is currently May 27th, 2012, 1:31 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: July 4th, 2005, 6:52 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
The view mode "list" for the listview doesn't work for the following code:

Code:
Gui, Add, ListView, xm r2 w500 Icon vLstOfIcons,Icon

Gui, Add, Radio, xm Section gRadIconsReport ,Report
Gui, Add, Radio, ys Checked gRadIconsIcons , Icons
Gui, Add, Radio, ys gRadIconsSmallIcons ,small Icons
Gui, Add, Radio, ys gRadIconsList , List

Gui, Show

;create new list of small images and replace and delete old one
IListIDIconsSmall := IL_Create(10, 10, False)
LV_SetImageList(IListIDIconsSmall)

;create new list of large images and replace and delete old one
IListIDIconsLarge := IL_Create(10, 10, True)
LV_SetImageList(IListIDIconsLarge)

;Search for 9999 icons in the selected file
Loop, 9999
  {
    ;get small icon
    ID := IL_Add(IListIDIconsSmall, A_WinDir . "\system32\shell32.dll" , A_Index)

    ;if small icon exist
    If ID > 0
      {
        ;get large icon
        IL_Add(IListIDIconsLarge, A_WinDir . "\system32\shell32.dll" , A_Index)

        ;add icon to list
        LV_Add("Icon" . A_Index, A_Index)
      }
    Else
        Break
  }

;Adjust width
LV_ModifyCol()
Return

;#############   Change of view mode for icon list   ##########################
RadIconsReport:
  GuiControl, +Report, LstOfIcons
  Gui, ListView, LstOfIcons
  LV_ModifyCol()
Return

RadIconsIcons:
  GuiControl, +Icon, LstOfIcons
Return

RadIconsSmallIcons:
  GuiControl, +IconSmall, LstOfIcons
Return

RadIconsList:
  GuiControl, +List, LstOfIcons
Return

;#############   Close window   ###############################################
GuiClose:
GuiEscape:
  ExitApp
Return
;#############   End of File   ################################################


But it does work if you change the top lines from this
Quote:
Gui, Add, ListView, xm r2 w500 Icon vLstOfIcons,Icon

Gui, Add, Radio, xm Section gRadIconsReport ,Report
Gui, Add, Radio, ys Checked gRadIconsIcons , Icons
Gui, Add, Radio, ys gRadIconsSmallIcons ,small Icons
Gui, Add, Radio, ys gRadIconsList , List
to this
Quote:
Gui, Add, ListView, xm r6 w500 List vLstOfIcons,Icon

Gui, Add, Radio, xm Section gRadIconsReport ,Report
Gui, Add, Radio, ys gRadIconsIcons , Icons
Gui, Add, Radio, ys gRadIconsSmallIcons ,small Icons
Gui, Add, Radio, ys Checked gRadIconsList , List


So, I assume that there is a bug.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 5th, 2005, 12:42 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I think this issue is caused by using LV_ModifyCol() [with no parameters] to auto-size the columns of a ListView that isn't in Report view. Apparently, the control doesn't like this. If after adjusting for this there is still any unexplained behavior, please let me know.

The next version will contain a change that prevents columns from being autosized while in non-column (non-report) view.

Thanks for reporting it.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group