Jump to content

Listview recreation error


Recommended Posts

When resizing a window after you recreated a listview, the listview is not correctly redraw.

- Run underneath code

- resize the window using the mouse

- hit the button, recreate the listview (will be the same size and position as shown)

- resize the window using the mouse

Is it a bug ?

#include <GUIConstants.au3>

GUICreate("listview resize test",300,200, 100,200, $WS_OVERLAPPEDWINDOW)
; --- create a 3 column list ---
$listview = GUICtrlCreateListView ("col1|col2|col3  ", 20, 10, 240, 150)
$button = GUICtrlCreateButton ("recreate",100,170,70,20)

   $msg = GUIGetMsg ()
   if $msg = $button Then
            $a_info=ControlGetPos("", "", $listview)    ; get current pos and size
            GUICtrlDelete($listview)                    ; delete current list
        ; --- create a 2 column list ---
            $listview = GUICtrlCreateListView ("col1|col2",$a_info[0],$a_info[1],$a_info[2],$a_info[3])
Until $msg = $GUI_EVENT_CLOSE
Link to comment
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

  • Recently Browsing   0 members

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