 |
|
 |
the version in this page is the one updated in 14 july(by history text) .it doesnot support the subitem'image.
the newest version is 4 dec. where is it ?
|
|
|
|
 |
|
 |
Hi;
If anyone has implemented this style,can u please post it here ??
|
|
|
|
 |
|
 |
In listCtrl, we can use SetItemData to bound DWORD to every list item, but in this control, we can't do that, hope you can give those functions:SetItemData, GetItemData.;P
|
|
|
|
 |
|
 |
To set data use:
CItemInfo *lpItem=new CItemInfo();
int <CODE>YourValue</CODE>=123;
lpItem->SetItemText(_T("Note"));
lpItem->m_lParam=<CODE>YourValue</CODE>;
m_listItem.InsertRootItem(lpItem);
To get data (For example in OnNMDblclkGrid()):
CTreeItem* pSelItem=m_listItem.GetTreeItem(index);
int <CODE>YourValue</CODE>=(int)pSelItem->m_lpNodeInfo->m_lParam;
Wormhole is the God divided by zero
|
|
|
|
 |
|
 |
Hi guru,
I am a newbie in C++ Programming. I am trying to use this control on my bill of material (BOM) program. I have a list of BOM (ParentNo, ChildNo, Description, etc) that I want to display using this control. So, I use loop (for i = ...) to loop through the list and InsertItem(ParentNo, ChildNo). How do I write the loop program to insert all the ChildNo using ParentNo as the Parent. Please Note: ParwentNo is not displayed, it's only used to specified where the ChildNo belonged to. Thank you for all your help and suggestion.
Tom.
|
|
|
|
 |
|
 |
How do i set the check boxes after the icons ?
Most of lists do that way.
THX
|
|
|
|
 |
|
 |
Ooopss, I made a mistakae, i wanted to say check boxes before icons.
Thx
|
|
|
|
 |
|
|
 |
|
 |
I want to realize the directory tree like the listview.Beacuse I want to realize the directory tree, I just know how to realize the tree not other function code.But I can't to understand where to construct the tree in the project.
Pls help me.
Thanks!
|
|
|
|
 |
|
 |
I want to be able to sort list by clicking on a column header. It should sort depending on column data type.
I am beginner in C++..
But I like control, a lot. It reminds me of Delphi control I like (ELTreeView from LMD Tools)
|
|
|
|
 |
|
 |
How can one set different Item-Heights? default is only one Height for alle Items.
ITZ-MEDICOM
|
|
|
|
 |
|
 |
Does anyone have an idea how to set different height of the items, pleease?
|
|
|
|
 |
|
 |
Hi,
first I want to thanks the developer. you saved me a lot of time.
I have worked a lot on this listctrl but I just couldn't replace two raws in
the list. I added two buttons for moving a selected raw Up and Down.
Does anyone achived such a thimg?
Uv
|
|
|
|
 |
|
 |
how can set a col readonly?
|
|
|
|
 |
|
 |
Hi;
I'm popping up a dialog containing only a CComboBoxEx in response to a column RClick. The last ComboboxEx list item text (as soon as DoModal on dialog) appears in all supergrid cells (in created rows) that have not been initialized with text or have been initialized with _T(""). The reason for the popup (rather than using a cell Listbox) is for UI consistency with other cells which require more complex dialogs.
The workaround to this is to initialize all column cells with _T(" ") at row creation.
If anyone wants to look into this, let me know and I will put together a simple test case.
Regards;
Bill
|
|
|
|
 |
|
 |
Hi..
Can I use this control wrapped in managed user control in .net windows ???
I have tried it but i cannot get the display since DrawItem and MeasureItem is not called ... i think some message handler is corrupt or i have intialize it manually
can any one help
Chetan.M
|
|
|
|
 |
|
 |
I have been using this control for a while and it works nicely once you understand it, but it seems there is no way to sort on the root items. Try it in the example. You'll see that the top most root items don't sort. Only the children do.
I added some code to try to fix this problem, by calling CListView::SortItems() and then swapping the corresponding CTreeItem pointers among each LV_ITEM in the view. It does sort, but the children don't show correctly when the +/- signs are clicked.
Anyone figure this one out?
|
|
|
|
 |
|
 |
I'm sorry to say - but while I'm sure you've worked a lot on it, and the UI looks great -,
IT IS EXTREMELY HARD TO USE IN REAL APPS.
In fact, it made my life a nightmare to use (I've worked on a project that used this class, and needed to customize the UI).
I would suggest you provide a MUCH simpler interface . The current one is way too big, hard to understand, and error prone.
Especially, what really killed me, was the fact that when the user clicks a "Collapse" button, my list items are DELETED. Thus, I needed to create an extra wrapper to somewhere hold references to their text.
Then, I had to create a custom mechanism for uniquely identifying an item in such a Super Grid (since the item's index wouldn't work)
John Torjo
Freelancer
-- john@torjo.com
Contributing editor, C/C++ Users Journal
-- "Win32 GUI Generics" -- generics & GUI do mix, after all
-- http://www.torjo.com/win32gui/
Professional Logging Solution for FREE
-- http://www.torjo.com/code/logging.zip (logging - C++)
-- http://www.torjo.com/logview/ (viewing/filtering - Win32)
-- http://www.torjo.com/logbreak/ (debugging - Win32)
(source code available)
|
|
|
|
 |
|
 |
>I'm sorry to say
hey don't be
>but while I'm sure you've worked a lot on it, and the UI looks great -,
I worked on this 3 weeks in 1999 and I am sorry I didn't factored the interface back then, I was in a hurry...and I figured perhaps someone else could use this code, so I uploaded it here...
>Especially, what really killed me, was the fact that when the user clicks >a "Collapse" button, my list items are DELETED
you actually did not take the time to read the article, did you now
>Then, I had to create a custom mechanism for uniquely identifying an item
I hope your nightmares are over .
I am sorry that you didn't get a free ride with this control here.
keep up the good work.
|
|
|
|
 |
|
 |
Sorry for the harsh words - I was very angry at that time. You must have put a lot of effort in it.
I still think the interface is too huge, and perhaps it could benefit greatly from templates
Best,
John
--
John Torjo, Contributing editor, C/C++ Users Journal
-- "Win32 GUI Generics" -- generics & GUI do mix, after all
-- http://www.torjo.com/win32gui/ -v1.6.3 (Resource Splitter)
-- http://www.torjo.com/cb/ - Click, Build, Run!
|
|
|
|
 |
|
 |
[snipped a useless rant]
Nevermind! I'm stupid. and a jerk. Sorry. You must have spent a lot of time working on this and it does look great, when I can get it work. There is a little bit of overhead in getting this to work for in an application, but other than that I think it looks great.
However this question still stands. Also, what if you don't want images in the tree control?
I may fiddle with this and check. It seems whenver I eliminate the images the plus boxes also go away. Any attempt to doctor that space and the plus bozes get changed. Kinda a headache.
But good work! Thanks for sharing!
Thanks!
|
|
|
|
 |
|
 |
Not sure what I was thinking here. Yeah... would have been nice if I just posted the silly fix. Here is DrawItem. Look for the variable "m_NoImages". this variable is set by me if I have images or not. if not, I am commenting out code that deals with them. I've cut out some stuff to help with length. Hopefully it makes sense.
void CSuperGridCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
if (lpDrawItemStruct->CtlType != ODT_LISTVIEW)
return;
if(lpDrawItemStruct->itemAction == ODA_DRAWENTIRE)
{
...
CRect rcClip = lpDrawItemStruct->rcItem;
if(m_NoImages)
rcClip.left -= 20;
rcClip.left += GetIndent(pSelItem) * m_cxImage + m_cxImage + 2;
if(rcClip.left > GetColumnWidth(0))
rcClip.left = GetColumnWidth(0);
ExtTextOut(pDC->GetSafeHdc(), 0, 0, ETO_OPAQUE, CRect(0, rcClip.top, rcClip.right, rcClip.bottom), NULL, 0, NULL);
if((nWidth=m_cxImage-nWidth) >-1) {
if(!m_NoImages)
{
ImageList_DrawEx(m_himl, lvi.iImage, pDC->m_hDC,
rc.left + (GetIndent(pSelItem) * m_cxImage),
nY,
nWidth,
m_cyImage,
CLR_DEFAULT,
CLR_DEFAULT,
uiFlags);
}
DrawTreeItem(pDC, pSelItem, nItem, rc);
}
...
GetItemRect(nItem, rcItem, LVIR_LABEL);
pszText = MakeShortString(pDC, szBuff, rcItem.right - rcItem.left, 2*OFFSET_FIRST);
rcLabel = rcItem;
pDC->SetBkColor (crBackground);
pDC->SetTextColor (crText);
rcLabel.left+=OFFSET_FIRST;
rcLabel.right-=OFFSET_FIRST;
if(m_NoImages)
rcLabel.left -= 20;
pDC->DrawText(pszText,-1, rcLabel,DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER | DT_EXTERNALLEADING);
...
}}
Here a screen clip
from an application i am currently designing that shows the grid without the icons.
i have been working with this control quite a bit and have a LOT of logic changes and bug fixes. If the author would like a copy of my files I will send them. It's hard to put everything into this comment board. Also, I forgot many of the changes I put in. I don't comment as much as I should.
|
|
|
|
 |
|
 |
brdavid wrote:
I have a fix for anyone who wants to eliminate the icons that appear in the listview control.
Nice screen shot, but where can i find the fix?
Would be great if you share it.
|
|
|
|
 |
|
 |
Is there an easy way to place this in a different app?
|
|
|
|
 |
|
 |
I want to open a file include some data ,and show it in the root item of list,any suggestion?
|
|
|
|
 |