-
August 24th, 2005, 11:33 PM
#1
List control-- Seperating rows
hi frnds
how can i seperate the rows in a list box or list control (using line)
thanks in advance
shemna
-
August 24th, 2005, 11:39 PM
#2
Re: List control-- Seperating rows
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.
Last edited by dc_2000; August 24th, 2005 at 11:43 PM.
-
August 24th, 2005, 11:44 PM
#3
Re: List control-- Seperating rows
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.
pops
-
August 24th, 2005, 11:51 PM
#4
Re: List control-- Seperating rows
Originally Posted by Prabakaran
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.
did it
but i am getting the error
(296): error RC2104 : undefined keyword or key name: LVS_EX_GRIDLINES
-
August 24th, 2005, 11:59 PM
#5
Re: List control-- Seperating rows
Please include following header file "Commctrl.h" in your source file.
#include <Commctrl.h>
pops
-
August 25th, 2005, 12:00 AM
#6
Re: List control-- Seperating rows
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.
-
August 25th, 2005, 12:06 AM
#7
Re: List control-- Seperating rows
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.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
August 25th, 2005, 06:14 PM
#8
Re: List control-- Seperating rows
-
August 7th, 2013, 05:13 AM
#9
Re: List control-- Seperating rows
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?
-
August 7th, 2013, 07:19 AM
#10
Re: List control-- Seperating rows
From MSDN:
LVS_EX_GRIDLINES
Version 4.70. Displays gridlines around items and subitems. This style is available only in conjunction with the LVS_REPORT style.
Besides:
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?)
Victor Nijegorodov
-
August 7th, 2013, 02:38 PM
#11
Re: List control-- Seperating rows
Originally Posted by manjut19
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?
What version of Visual Studio are you using?
-
August 8th, 2013, 12:13 AM
#12
Re: List control-- Seperating rows
Originally Posted by Arjay
What version of Visual Studio are you using?
2008 ver.But igot the grid line.I used the function
HTML Code:
ListView_SetExtendedListViewStyle()
Thanks..
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
|