is8591 Posted April 7, 2006 Share Posted April 7, 2006 I found how to do vertical auto-scroll in ListView, but what about horisontal? I know that Beta has this functionality, but I have to use the release version. Also, while on the topic of ListView Is it possible to fix 1st column to be visible at all times even when horisontal scrolling, basically simulating Excel Freeze Pane? Thanks Link to comment Share on other sites More sharing options...
Zedna Posted April 7, 2006 Share Posted April 7, 2006 (edited) I found how to do vertical auto-scroll in ListView, but what about horisontal?I know that Beta has this functionality, but I have to use the release version.Not tested, but what about $WS_HSCROLL style:$ListView1 = GUICtrlCreateListView("Col1|Col2|Col3", 1, 1, 200, 200, BitOR($LVS_REPORT,$LVS_SINGLESEL,$LVS_SHOWSELALWAYS,$LVS_NOLABELWRAP,$WS_HSCROLL,$WS_VSCROLL,$WS_BORDER), BitOR($WS_EX_CLIENTEDGE,$LVS_EX_FULLROWSELECT)) Edited April 7, 2006 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
is8591 Posted April 7, 2006 Author Share Posted April 7, 2006 Not tested, but what about $WS_HSCROLL style:This will give user Horisontal scroll bar. I need to scroll programatically when user clicks on buttons.Something like what I found in MAGS postconst $LVM_ENSUREVISIBLE = 0x1013GUICtrlSendMsg($listview, $LVM_ENSUREVISIBLE, $line, 0)This will scroll vertically - I need horisontally Link to comment Share on other sites More sharing options...
GaryFrost Posted April 7, 2006 Share Posted April 7, 2006 $i_dx = Horizontal (pixels) $i_dy = Vertical (pixels) Global Const $LVM_FIRST = 0x1000 Global Const $LVM_SCROLL = ($LVM_FIRST + 20) GUICtrlSendMsg($h_listview, $LVM_SCROLL, $i_dx, $i_dy) 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...
is8591 Posted April 8, 2006 Author Share Posted April 8, 2006 $i_dx = Horizontal (pixels) $i_dy = Vertical (pixels) Global Const $LVM_FIRST = 0x1000 Global Const $LVM_SCROLL = ($LVM_FIRST + 20) GUICtrlSendMsg($h_listview, $LVM_SCROLL, $i_dx, $i_dy) Thanks a lot Gary. Just 2 quick questions: #1 - Anyway to scroll by rows and columns, and not pixels in report mode? #2 - How do you figure out hex values for message commands? Link to comment Share on other sites More sharing options...
Zedna Posted April 9, 2006 Share Posted April 9, 2006 (edited) Thanks a lot Gary. Just 2 quick questions: #1 - Anyway to scroll by rows and columns, and not pixels in report mode? #2 - How do you figure out hex values for message commands? Look at LVM_GetNextItem message and LVNI_ABOVE / LVNI_BELOW flag here is some C++ code from google (search LVNI_ABOVE): UINT nLastItem = GetSelectedCount() int nSelected = GetNextItem(nLastItem , LVNI_ABOVE | LVNI_SELECTED); while( nSelected != -1 ) { DeleteItem(nSelected); nSelected = GetNextItem( nSelected, LVNI_ABOVE | LVNI_SELECTED); } Here is MSDN description: MSDN: GetNextItem Here is my post with example of using TVM_xxx messages with TreeView:in AutoIt UDF _TreeViewGetItemState You can accomodate these informations/examples to your needs... EDIT: for scrolling by rows use LVM_GETITEMRECT message to get Rect for listview item (get its height) and then use LVM_SCROLL with y = (number_of_items * item_height) in pixels as gafrost said Edited April 9, 2006 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Zedna Posted April 9, 2006 Share Posted April 9, 2006 Thanks a lot Gary.Just 2 quick questions:#2 - How do you figure out hex values for message commands?See this:Post 1Post 2 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
is8591 Posted April 9, 2006 Author Share Posted April 9, 2006 Looks like the right place but will take some time to figure it out. 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