Arclite86 Posted April 7, 2014 Share Posted April 7, 2014 I have 4 lists if scroll down list1 only list1 will scroll down ( offcourse) I can I scroll down or scrol up list1 and list2,and liat 4 at the same time? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 7, 2014 Moderators Share Posted April 7, 2014 Arclite86,Just to be clear here before we start - are we discussing ListBoxes or ListViews? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Arclite86 Posted April 7, 2014 Author Share Posted April 7, 2014 Arclite86, Just to be clear here before we start - are we discussing ListBoxes or ListViews? M23 its for a listbox Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 7, 2014 Moderators Share Posted April 7, 2014 Arclite86,A pity - there are some messages to intercept with ListViews. This is the best I can come up with for ListBoxes:expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListBox.au3> Global $aList[5] = [4] Global $aTop[5] = [0, 0, 0, 0, 0] $hGUI = GUICreate("Synchro Quartet", 500, 500) $aList[1] = GUICtrlCreateList("", 10, 10, 200, 200, BitOr($WS_BORDER, $WS_VSCROLL)) $aList[2] = GUICtrlCreateList("", 260, 10, 200, 200, BitOr($WS_BORDER, $WS_VSCROLL)) $aList[3] = GUICtrlCreateList("", 10, 260, 200, 200, BitOr($WS_BORDER, $WS_VSCROLL)) $aList[4] = GUICtrlCreateList("", 260, 260, 200, 200, BitOr($WS_BORDER, $WS_VSCROLL)) For $i = 0 To 29 For $j = 1 To $aList[0] GUICtrlSetData($aList[$j], "Line " & $i) Next Next GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch For $i = 1 To $aList[0] If _GUICtrlListBox_GetTopIndex($aList[$i]) <> $aTop[$i] Then $aTop[$i] = _GUICtrlListBox_GetTopIndex($aList[$i]) For $j = 1 To $aList[0] _GUICtrlListBox_SetTopIndex($aList[$j], $aTop[$i]) $aTop[$j] = $aTop[$i] Next EndIf Next WEndThe problem is that ListBoxes do not send out many messages - so we are left with this rather kludgy solution. Unless anyone else can do better,of course. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Arclite86 Posted April 7, 2014 Author Share Posted April 7, 2014 Arclite86, A pity - there are some messages to intercept with ListViews. This is the best I can come up with for ListBoxes: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListBox.au3> Global $aList[5] = [4] Global $aTop[5] = [0, 0, 0, 0, 0] $hGUI = GUICreate("Synchro Quartet", 500, 500) $aList[1] = GUICtrlCreateList("", 10, 10, 200, 200, BitOr($WS_BORDER, $WS_VSCROLL)) $aList[2] = GUICtrlCreateList("", 260, 10, 200, 200, BitOr($WS_BORDER, $WS_VSCROLL)) $aList[3] = GUICtrlCreateList("", 10, 260, 200, 200, BitOr($WS_BORDER, $WS_VSCROLL)) $aList[4] = GUICtrlCreateList("", 260, 260, 200, 200, BitOr($WS_BORDER, $WS_VSCROLL)) For $i = 0 To 29 For $j = 1 To $aList[0] GUICtrlSetData($aList[$j], "Line " & $i) Next Next GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch For $i = 1 To $aList[0] If _GUICtrlListBox_GetTopIndex($aList[$i]) <> $aTop[$i] Then $aTop[$i] = _GUICtrlListBox_GetTopIndex($aList[$i]) For $j = 1 To $aList[0] _GUICtrlListBox_SetTopIndex($aList[$j], $aTop[$i]) $aTop[$j] = $aTop[$i] Next EndIf Next WEnd The problem is that ListBoxes do not send out many messages - so we are left with this rather kludgy solution. Unless anyone else can do better,of course. M23 it was not exacly what i wanted but, thank you for your time and I will use it , maybe somebody has an other idea 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