Jump to content

Recommended Posts

Posted

3.1.1.75

if gridlines are added to the extended style, works fine unless using the down/up arrows at the top and bottom of the scrollbar

#include <GuiConstants.au3>
#include <GuiListView.au3>

Opt ('MustDeclareVars', 1)
Dim $listview, $Btn_GetTop, $Btn_Exit, $msg, $Status
GUICreate("ListView Get Top Index", 392, 322)

$listview = GUICtrlCreateListView("col1|col2|col3", 40, 30, 310, 149)
;~ GUICtrlSendMsg($listview, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT)
;~ GUICtrlSendMsg($listview, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_HEADERDRAGDROP, $LVS_EX_HEADERDRAGDROP)
GUICtrlSendMsg($listview, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES)
;~ GUICtrlSendMsg($listview, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_TRACKSELECT, $LVS_EX_TRACKSELECT)
GUICtrlCreateListViewItem("line1|data1|more1", $listview)
GUICtrlCreateListViewItem("line2|data2|more2", $listview)
GUICtrlCreateListViewItem("line3|data3|more3", $listview)
GUICtrlCreateListViewItem("line4|data4|more4", $listview)
GUICtrlCreateListViewItem("line5|data5|more5", $listview)
GUICtrlCreateListViewItem("line6|data6|more6", $listview)
GUICtrlCreateListViewItem("line7|data7|more7", $listview)
GUICtrlCreateListViewItem("line8|data8|more8", $listview)
GUICtrlCreateListViewItem("line9|data9|more9", $listview)
GUICtrlCreateListViewItem("line10|data10|more10", $listview)
GUICtrlCreateListViewItem("line11|data11|more11", $listview)
GUICtrlCreateListViewItem("line12|data12|more12", $listview)
$Btn_GetTop = GUICtrlCreateButton("Get Top Index", 150, 230, 90, 40)
$Btn_Exit = GUICtrlCreateButton("Exit", 300, 260, 70, 30)
$Status = GUICtrlCreateLabel("Remember items are zero-indexed", 0, 302, 392, 20, BitOR($SS_SUNKEN, $SS_CENTER))

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit
            ExitLoop
        Case $msg = $Btn_GetTop
            GUICtrlSetData($Status, "Top Index: " & _GUICtrlListViewGetTopIndex($listview))
    EndSelect
WEnd
Exit

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Posted

I don'tt understand the problem the index look allright 0 to 4

incrementing by one when click on the arrow down decrementing when using the arrow up :">

Posted

Maybe something with the resolution?

Can someone compile the script and attach it?

you probably need to ZIP the file.

I'm going to test here then.

<{POST_SNAPBACK}>

here is
Posted (edited)

Yep, refresh bug.

Posted Image

Posted Image

Windows XP SP1

resolution: 1024x768

When using the mouse wheel to scroll, you see no bug.

As Gafrost said use the scrollbar buttons.

Both the buttons cause the refresh bug.

Edited by SlimShady
Posted

???? OK on my system 1024/768

how do you produce the errors?

<{POST_SNAPBACK}>

click on the scroll bar buttons, arrow buttons.

ow, and I tested with 1024x768 and 1280x1024 resolutions.

Both the same refresh bug.

Posted

click on the scroll bar buttons, arrow buttons.

ow, and I tested with 1024x768 and 1280x1024 resolutions.

Both the same refresh bug.

<{POST_SNAPBACK}>

Something related with speed/video card ??? :">
Posted

It is a paint problem on the listview control. If I drag another window over, the lines get fixed.

Lar.

<{POST_SNAPBACK}>

Why I don't need to do that?
Posted

@jpm: do you plan now to implement the "SystemParametersInfo" (thanks Larry for info) to get it works right?

(BTW: I also switched it off so I couldn't reproduce it at frist ;) )

<{POST_SNAPBACK}>

It is not our responsibility to fix Microsoft's bugs. We should be trying to provide generic GUI building capabilities. We can not override user-specified features at the OS level. That is bad design. There are 3 solutions to this problem:
  • Live with it.
  • Turn off the feature at the OS level on your machine.
  • The script author can programmatically make the SystemParametersInfo call themselves (Although this is still bad UI design since it does not take the user's settings into consideration).
AutoIt should not be responsible for fixing this bug.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...