Sign in to follow this  
Followers 0
MarkStaver

Scrollbar Help

4 posts in this topic

Func My_Scrollbars_WM_VSCROLL ($hWnd, $iMsg, $wParam, $lParam)
        _Scrollbars_WM_VSCROLL($hWnd, $iMsg, $wParam, $lParam)
        Local $tSCROLLINFO = _GUIScrollBars_GetScrollInfoEx($hWnd, $SB_VERT)
        $Pos = DllStructGetData($tSCROLLINFO, "nPos")
        MsgBox(-1,'', $Pos)
EndFunc

Hello once again :)

by that code I receiving some data which is not  pixels or percents.

What it is?

I an trying to get from it coordinates of top left corner.

Share this post


Link to post
Share on other sites



MarkStaver,

This has nothing to do with my GUIScrollbars_Ex UDF so I have split it into a new thread. :)

What you get returned from this function is, as explained in the Help file, a $tagSCROLLINFO structure. This is an area in memory which you can read using DllStructGetData as shown in the example for that function. What information are you trying to get? :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

MarkStaver,

This is as close as I can get to >your "Freeze" left column/top row request:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <GuiScrollBars.au3>

Global $iMax_Vert = 40, $iMax_Horz = 20

$hGUI = GUICreate("Synchro Test", 500, 500)

$sTitle = ""
For $j = 0 To $iMax_Horz
    $sTitle &= "Col " & $j & "|"
Next
$sTitle = StringTrimRight($sTitle, 1)

$cLV_Main = GUICtrlCreateListView($sTitle, 60, 35, 350, 250, $LVS_NOCOLUMNHEADER)
$hLV_Main = GUICtrlGetHandle($cLV_Main)

GUISetState()

$hGUI_Vert = GUICreate("", 50, 233, 10, 35, $WS_POPUP, $WS_EX_MDICHILD, $hGUI)
$cLV_Vert = GUICtrlCreateListView("LV_Vert", 0, 0, 85, 250, $LVS_NOCOLUMNHEADER)
$hLV_Vert = GUICtrlGetHandle($cLV_Vert)

GUISetState()

$hGUI_Horz = GUICreate("", 333, 25, 60, 10, $WS_POPUP, $WS_EX_MDICHILD, $hGUI)
$cLV_Horz = GUICtrlCreateListView($sTitle, 0, 0, 350, 45)
$hLV_Horz = GUICtrlGetHandle($cLV_Horz)

GUISetState()

For $i = 0 To $iMax_Vert
    GUICtrlCreateListViewItem("Row " & $i, $cLV_Vert)
Next

For $i = 0 To $iMax_Horz
    _GUICtrlListView_SetColumnWidth($cLV_Main, $i, 75)
    _GUICtrlListView_SetColumnWidth($cLV_Horz, $i, 75)
Next

For $i = 0 To $iMax_Vert
    $sText = ""
    For $j = 0 To $iMax_Horz
        $sText &= "Item " & $i & " - " & $j & "|"
    Next
    GUICtrlCreateListViewItem(StringTrimRight($sText, 1), $cLV_Main)
Next

Global $aRect = _GUICtrlListView_GetItemRect($hLV_Main, 0)
Global Const $iDeltaY = $aRect[3] - $aRect[1]

GUIRegisterMsg($WM_NOTIFY, "_WM_Notify")

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Func _WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam)

    Local Const $iHPos = _GUIScrollBars_GetScrollPos($hLV_Main, $SB_HORZ) - _GUIScrollBars_GetScrollPos($hLV_Horz, $SB_HORZ)
    GUICtrlSendMsg($cLV_HORZ, $LVM_SCROLL, $iHPos, 0)

    Local Const $iLines = _GUICtrlListView_GetTopIndex($cLV_Main) - _GUICtrlListView_GetTopIndex($cLV_Vert)
    GUICtrlSendMsg($cLV_Vert, $LVM_SCROLL, 0, $iLines * $iDeltaY)

    Return "GUI_RUNDEFMSG"

EndFunc   ;==>_WM_Notify
As you can see, it has nothing to do with my Scrollbars_Ex UDF. I hope it helps you - please ask if you have any questions. :)

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

#4 ·  Posted (edited)

Thank you for that solution. I had no time to look at it yet. Please take me a week now I've stuck at adding icons to drop down ^_^ trying to get us much info I can before asking.

I'll be back soon to that tread.

 

So I had fast look   :)

yes your solution will help me any way.

Idea was to make it labels because there will be other labels on top of it. it will be graph finally. Unfortunately list view not that good at that point us good us labels is, but labels are positioning from visible GUI coordinates.... math will help me, and i'l share it. 

Edited by MarkStaver

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