Sign in to follow this  
Followers 0
marfdaman

Scroll Wheel icw Listview

4 posts in this topic

Using the following code, if I use the scrollwheel on my mouse, the horizontal grid lines either don't get drawn or they get drawn in the middle of a cell. It only happens when the listview has not got the focus (I made the button focused in the example).

Could someone look to see if it's something with my computer?

#include <GUIConstants.au3>
; == GUI generated with Koda ==
$Form1 = GUICreate("AForm1", 622, 441, 192, 125)
$ListView1 = GUICtrlCreateListView("stdtdtd", 56, 64, 385, 209, -1, $LVS_EX_GRIDLINES)
For $i = 1 To 100
    GUICtrlCreateListViewItem("Test" & $i, $ListView1)
Next
$x = GUICtrlCreateButton("dgfgfdg", 0, 0)
GUISetState(@SW_SHOW)
GUIctrlSetState($x, $GUI_FOCUS)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
        ;;;;;;;
    EndSelect
WEnd
Exit

Tnx


Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Share this post


Link to post
Share on other sites



Using the following code, if I use the scrollwheel on my mouse, the horizontal grid lines either don't get drawn or they get drawn in the middle of a cell. It only happens when the listview has not got the focus (I made the button focused in the example).

Could someone look to see if it's something with my computer?

#include <GUIConstants.au3>
; == GUI generated with Koda ==
$Form1 = GUICreate("AForm1", 622, 441, 192, 125)
$ListView1 = GUICtrlCreateListView("stdtdtd", 56, 64, 385, 209, -1, $LVS_EX_GRIDLINES)
For $i = 1 To 100
    GUICtrlCreateListViewItem("Test" & $i, $ListView1)
Next
$x = GUICtrlCreateButton("dgfgfdg", 0, 0)
GUISetState(@SW_SHOW)
GUIctrlSetState($x, $GUI_FOCUS)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
        ;;;;;;;
    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 haven't been able to duplicate it, but it seems that I remember something about that it may have something to with effects on XP...

Thanks big time gary, it was indeed one of those options ("Use the following transition effect for menus and tooltips"). Turning it off solved my issue.

Tnx again!


Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Share this post


Link to post
Share on other sites

...

Also your Listview will draw better if you set the gridlines after creating the listview

...

Thanks gafrost, for this valuable hint.

In my ELV i was setting the gridlines with the GUICtrlCreateListView() call. I had to correct the position of the editobjects by +2 to +4 to make the upper left corner match to the ListView cell. After i used your tip and set it them after the creation, this offset is no longer required. All my edit-objects work with the given coordinates now. Every correction would have been bad, because what happens, when windows uses a complete screwed up theme with thicker borderlines or whatever? Thanks to your suggestion, this is more clear and comprehensible now. Seems like a bug in the ListView management.

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