Sign in to follow this  
Followers 0
GaryFrost

listview and gridlines

25 posts in this topic

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.

 

Share this post


Link to post
Share on other sites



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 :">

Share this post


Link to post
Share on other sites

I don't see such weird refresh under XP/Sp2 with or without the XP Theme. :">

Which OS version are you running with?

Share this post


Link to post
Share on other sites

XP Pro SP2, Windows Classic

<{POST_SNAPBACK}>

I run the same and I cannot see the problem :">

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#10 ·  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

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

???? OK on my system 1024/768

how do you produce the errors?

Edited by jpm

Share this post


Link to post
Share on other sites

???? 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.

Share this post


Link to post
Share on other sites

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 ??? :">

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

I tried the work around and that does work.

It's a shame that microsoft has know about the bug with the control for so long and hasn't fixed it yet.


SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Share this post


Link to post
Share on other sites

Works fine when I drag the scroll button, but when I click the up and down arrows, I get extraneous lines (WinXP Classic Theme).

http://64.233.167.104/search?q=cache:ThUFh...2+problem&hl=en

<{POST_SNAPBACK}>

Whatever I dclick the updown I cannot reproduce it on my system.

I will recommend the Larry Post suggestion use as less as possible the grid. At least don't expect a very good repainting ;)

Share this post


Link to post
Share on other sites

I just see the workaround it appear that I was using it !!! ;)

Share this post


Link to post
Share on other sites

@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.

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