hi frnds
how can i seperate the rows in a list box or list control (using line)
thanks in advance
shemna
Printable View
hi frnds
how can i seperate the rows in a list box or list control (using line)
thanks in advance
shemna
Add a line of minuses (i.e, "-------------") and give it a -1 or some other value that your list control won't use. The downside of this method is that user can still select it. In this case you'll need to show a warning or pop the list back up. You may also edit list box notifications LBN_SELCHANGE (NM_CLICK, LVN_ITEMCHANGING, LVN_ITEMCHANGED) to dismiss user selection of this separator. See MSDN for more details.
Another way would be to create your own list control or buy someone elses.
Hi,
You can change list control style with LVS_EX_GRIDLINES.
By setting this style
"Displays gridlines around items and subitems. This style is available only in conjunction with the LVS_REPORT style."
I hope this helps you.
Quote:
Originally Posted by Prabakaran
did it
but i am getting the error
(296): error RC2104 : undefined keyword or key name: LVS_EX_GRIDLINES
Please include following header file "Commctrl.h" in your source file.
#include <Commctrl.h>
from Commctrl.h:
#define LVS_EX_GRIDLINES 0x00000001
if you are using MFC, add to stdafx.h the line
#include <afxcmn.h>
and that should do it.
How did you add LVS_EX_GRIDLINES style? In a resource editor?
You should use SetExtendedStyle to set this style. IE must be ver 4 or higher and _WIN32_IE should be defined 0x0400 or higher.
Here are all the extended list view styles
http://msdn.microsoft.com/library/de.../ex_styles.asp
I added that header file also.But i am not getting.Actually i created the list control using resource editor.So i added that style to .rc file.But now also showing the same error.What to do?
From MSDN:Besides:Quote:
LVS_EX_GRIDLINES
Version 4.70. Displays gridlines around items and subitems. This style is available only in conjunction with the LVS_REPORT style.
1. What header file did you add and where?
2. How is _WIN32_IE defined in your project?
3. How exactly did you set LVS_EX_GRIDLINES style (how did you add that style to .rc file?)