-
August 6th, 1999, 01:28 PM
#1
Problems when reordering columns in listview control
I have a listview control (in a dialog box) and I've changed the LVS_EX_HEADERDRAGDROP style
so that the user can reorder the columns by dragging and dropping the headers. It works fine but I have three problems:
1. After the user has reordered a column, I need to be notified somehow. How?
2. If the user moves the first column to another location, a white vertical bar gets drawn after the new first column.
3. You know how when you type a letter, it searches for the next matching item based on the first column? Well, when you reorder the columns and make a different column the first one, the typing is still used to search in the original column, instead of the new first one.
I really appreciate your help me solve these issues.
Alvaro
-
October 11th, 2012, 07:49 AM
#2
Re: Problems when reordering columns in listview control
1.ON_NOTIFY_EX(HDN_ENDDRAG, 0, OnHeaderEndDragMethod)
3.Header_GetOrderArray
HWND HeaderCtrlHandle,
int TotalColumns, int *lpiArray;
//Header_GetOrderArray( HeaderCtrlHandle, TotalColumns,lpiArray);
lpiArray Contain Column present columns order
lpiArray={1,0,2};
if u want new first column text
GetItemText(Item(which item do u want),lpiArray[column]);
don't give sub item values 0 or 1 give like lpiArray[0] or lpiArray[1];
those will give present exact column values
-
October 11th, 2012, 07:58 AM
#3
Re: Problems when reordering columns in listview control
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|