ListView becomes editable 
Author Message
 ListView becomes editable

Hi,
I have a owner drawn list view. But on double clicking a row, the first
column becomes editable, which is what I dont want.
Iam creating the list view with this
CreateWindowEx( 0L,
      WC_LISTVIEW,
      TEXT(""),
      WS_VISIBLE | WS_CHILD |LVS_REPORT | LVS_SINGLESEL | LVS_OWNERDRAWFIXED
| WS_BORDER | LVS_ICON | WS_EX_CLIENTEDGE,
      rcPos.left,
      rcPos.top,
      rcPos.right - rcPos.left,
      rcPos.bottom - rcPos.top,
      m_hWnd,
      (HMENU) ID_LISTCTRL ,
      _Module.GetModuleInstance(),
      NULL);

I dont want the list view to become editable. Is there anything wrong Iam
doing or should I check for anything ?

Thanks,
-Venkat



Sun, 27 Mar 2005 22:08:11 GMT  
 ListView becomes editable

Quote:
>I dont want the list view to become editable. Is there anything wrong Iam
>doing or should I check for anything ?

WS_EX_CLIENTEDGE is an extended style and can't be listed in the same flags
as the normal styles. Both WS_EX_CLIENTEDGE and LVS_EDITLABLES have the
value of 0x0200, which explains the behaviour.

WS_EX_CLIENTEDGE should be specified in the first parameter to
CreateWindowEx, which you currently have as zero.

BTW, a quirk in list views mean that if you want to specify extended list
view styles (such as LVS_EX_FULLROWSELECT), they are not listed here as with
other common controls, but must be set by sending a
LVM_SETEXTENDEDLISTVIEWSTYLE message. You do not use any of these styles
yet.

Christian.



Sun, 27 Mar 2005 23:20:41 GMT  
 ListView becomes editable
Thanks Christian. I got it.
-Venkat


Quote:
> >I dont want the list view to become editable. Is there anything wrong Iam
> >doing or should I check for anything ?

> WS_EX_CLIENTEDGE is an extended style and can't be listed in the same
flags
> as the normal styles. Both WS_EX_CLIENTEDGE and LVS_EDITLABLES have the
> value of 0x0200, which explains the behaviour.

> WS_EX_CLIENTEDGE should be specified in the first parameter to
> CreateWindowEx, which you currently have as zero.

> BTW, a quirk in list views mean that if you want to specify extended list
> view styles (such as LVS_EX_FULLROWSELECT), they are not listed here as
with
> other common controls, but must be set by sending a
> LVM_SETEXTENDEDLISTVIEWSTYLE message. You do not use any of these styles
> yet.

> Christian.



Mon, 28 Mar 2005 20:30:41 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ListView becomes editable

2. ListView Items: Can they be Editable?

3. Combobox - changing between editable and non-editable

4. Parent-Child Editable Grid Example?

5. Editable Text Fields

6. making cells in Datagrid Non-Editable...

7. Editable input?

8. Problem with Creating an Editable ComboBox

9. Adding a constructor for a given (non editable) class

10. editable console prompt

11. How to set combobox editable?

12. Q: How to create an editable control?

 

 
Powered by phpBB® Forum Software