Sign in to follow this  
Followers 0
Arclite86

scroll down 4 lists at same time

5 posts in this topic

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?

Share this post


Link to post
Share on other sites



Arclite86,

Just to be clear here before we start - are we discussing ListBoxes or ListViews? :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Arclite86,

Just to be clear here before we start - are we discussing ListBoxes or ListViews? :huh:

M23

its for a listbox :)

Share this post


Link to post
Share on other sites

Arclite86,

A pity - there are some messages to intercept with ListViews. :(

This is the best I can come up with for ListBoxes:

#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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Arclite86,

A pity - there are some messages to intercept with ListViews. :(

This is the best I can come up with for ListBoxes:

#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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0