Sign in to follow this  
Followers 0
Hobbyist

Listview and $LVS_EX_HEADERDRAGDROP

1 post in this topic

Before I go off in the wrong direction I have a question on the above topic.  

Background first:

I am going to populate Listview#10 with items in x columns.

Listview#10 has the extended style of $LVS_EX_HEADERDRAGDROP - as I understand it I can drag the columns to new positions within the Listview. Done that and it works.

Additionally I will populated the Listview#10 using  _GUICtrlListView_AddArray  -done that as well.

So after having rearranged the columns will something like the attached work? or should it work and have the items in the array in their new position after the dragging. Does dragging the headers allow the items to be repositioned in any new array?

The goal would be to use the newly created array to populate a second Listview#11.

So far, using the attached code to create an array from the Listview#10 results in an array of the originally positioned columns (ie not rearranged).

If you point me in the right direction or correct my thinking I believe I can do this.

Pointers and suggestions please. I will try and if I run into roadblocks will return with my complete code and questions.

Func _GUICtrlListView_CreateArray()
    

  Local $iRows = _GUICtrlListView_GetItemCount($list10)
   Local $iCols = _GUICtrlListView_GetColumnCount($list10)
   Local $aListView[$iRows][$iCols]
   For $i = 0 To $iRows -1
      For $j = 0 To $iCols -1
         Local $aItem = _GUICtrlListView_GetItem($list10, $i, $j)
         $aListView[$i][$j] = $aItem[3]
      Next
  Next
 
_ArrayDisplay($aListView, "see it")

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