sanhen Posted October 5, 2008 Posted October 5, 2008 expandcollapse popup#include <WindowsConstants.au3> #include <Misc.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #Include <GuiImageList.au3> #NoTrayIcon Opt("GUIOnEventMode", 1) _Singleton(@ScriptName) $hGUI=GUICreate ("test", 500,300,-1,-1) GUISetOnEvent($GUI_EVENT_CLOSE, "_GuiMsg") $hListView = GUICtrlCreateListView("", 0, 0,500, 300) GUICtrlSetStyle($hListView, $LVS_ICON) $hImage = _GUIImageList_Create(32, 32, 5, 3) For $x = 0 To 206 _GUIImageList_AddIcon($hImage, "shell32.dll","15", True) _GUICtrlListView_AddItem($hListView, $x+1, $x) Next _GUICtrlListView_SetImageList($hListView, $hImage, 0) GUISetState() While 1 Sleep(250) Wend Func _GuiMsg() Switch @GUI_CTRLID Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_MINIMIZE guisetstate(@SW_MINIMIZE) EndSwitch EndFunc I need this:
rasim Posted October 6, 2008 Posted October 6, 2008 sanhenWhere a problem? I don't see. Seem your GUI similar to a GUI in the attached image.
sanhen Posted October 6, 2008 Author Posted October 6, 2008 I need the horizontal scroll bar, and now it is vertical.
rasim Posted October 6, 2008 Posted October 6, 2008 sanhen I need the horizontal scroll bar, and now it is vertical. I have not seen this Ok, try this: expandcollapse popup#include <WindowsConstants.au3> #include <Misc.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #Include <GuiImageList.au3> #NoTrayIcon Opt("GUIOnEventMode", 1) _Singleton(@ScriptName) $hGUI=GUICreate ("test", 500,300,-1,-1) GUISetOnEvent($GUI_EVENT_CLOSE, "_GuiMsg") $hListView = GUICtrlCreateListView("", 0, 0,500, 300) GUICtrlSetStyle($hListView, $LVS_ICON) $hImage = _GUIImageList_Create(32, 32, 5, 3) _GUIImageList_AddIcon($hImage, "shell32.dll", "15", True) ;Extract large icons _GUICtrlListView_SetImageList($hListView, $hImage, 1) ;but use as small icons For $x = 0 To 99 _GUICtrlListView_AddItem($hListView, $x + 1, 0) Next _GUICtrlListView_SetView($hListView, 2) ;Set the view mode (2 = List) GUISetState() While 1 Sleep(100) Wend Func _GuiMsg() Switch @GUI_CTRLID Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_MINIMIZE guisetstate(@SW_MINIMIZE) EndSwitch EndFunc
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