CXTPTreeCtrl - HasLines = doesn't |
Post Reply |
Author | |
Algae
Senior Member Joined: 08 January 2007 Location: United States Status: Offline Points: 217 |
Post Options
Thanks(0)
Posted: 09 May 2013 at 6:37pm |
v. 16.1
Latest CXTPTreeCtrl doesn't seem to accept styles. Try adding TVS_HASLINES|TVS_LINESATROOT and nothing happens. Worked in v. 15.3.1. Am I missing something? |
|
ilya
Groupie Joined: 07 May 2012 Status: Offline Points: 37 |
Post Options
Thanks(0)
|
This is a known issue, it's been recorded in the internal bug tracking system and will be solved
|
|
prekopj
Newbie Joined: 02 November 2011 Location: Slovak Republic Status: Offline Points: 4 |
Post Options
Thanks(0)
|
I have version 16.2.0 but this problem is not corrected. When will be fixed?
|
|
jbriguet
Newbie Joined: 27 March 2013 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Marco1
Senior Member Joined: 16 January 2004 Location: Germany Status: Offline Points: 251 |
Post Options
Thanks(0)
|
I can confirm this.
In 15.3.1: No code changed, in 16.2.0: ... and as you can see, the space for the icons in 16.2.0 is too small, too. Please fix and test both bugs. Thanx! |
|
ilya
Groupie Joined: 07 May 2012 Status: Offline Points: 37 |
Post Options
Thanks(0)
|
Treelines are fixed in 16.2.1
Please attach a sample project to illustrate icons spacing issue
|
|
Algae
Senior Member Joined: 08 January 2007 Location: United States Status: Offline Points: 217 |
Post Options
Thanks(0)
|
Lines (and icons) are STILL not working in version 16.2.3
Try it: DWORD dwStyle = WS_VISIBLE|TVS_HASLINES|TVS_LINESATROOT|TVS_TRACKSELECT|TVS_HASBUTTONS|TVS_SHOWSELALWAYS|TVS_FULLROWSELECT; if (m_treeCtrl.Create(dwStyle, CRect(0,0,0,0), this, IDC_TREE)) { GetTreeCtrl().SetItemHeight(26); } In the treectrl demo where lines are set by dialog resource it appears OK. Create fails. Build Unicode Debug Static VS 2010 Win 7 Pro |
|
Algae
Senior Member Joined: 08 January 2007 Location: United States Status: Offline Points: 217 |
Post Options
Thanks(0)
|
Kludge fix for version 16.2.3 -
As a temporary solution I replaced XTPTreeBase.cpp with the one from version 15.3.1. With this change, the tree control appears to perform as expected. |
|
roan98dk
Groupie Joined: 13 February 2011 Status: Offline Points: 14 |
Post Options
Thanks(0)
|
I have a perhaps related issue with a CXTPTreeCtrl using TVS_CHECKBOXES and no images. In 15.3.1 it worked fine, but in 16.2.3 I can only get TVS_CHECKBOXES to work if I also add images to all nodes, but that is not what I want.
Perhaps it was an error in the old version. At least I noticed in my old code that I actually loaded images for all nodes, but the CImageList creation failed (corresponding to a nullptr being assigned to SetImageList). 15.3.1 with TVS_CHECKBOXES and nullptr in SetImageList 16.2.3 with TVS_CHECKBOXES and nullptr in SetImageList Maybe it is my understanding that is wrong, but is it not supposed to be possible to have checkboxes without images on all nodes? It looks ridiculous with both checkboxes and images.
|
|
grudy
Groupie Joined: 02 November 2004 Location: United States Status: Offline Points: 19 |
Post Options
Thanks(0)
|
I just built with 16.2.4 and still have problems with the tree control... because of these we have been stuck on 15.3.1 for quite awhile. In my case I have check boxes on some items, but not on all. As you can see from the picture below, it kind of looks like there is space being left for check boxes on all items. For some reason this draws the Tree lines and the expand/collapse boxes too far left. In fact, it is just the drawing though... to actually make the expand/collapse boxes work, you have to click in the empty space where they should be! I can't say strongly enough that we need this fixed. We reall need to get back to the same proper behavior that was in 15.3.1
|
|
Algae
Senior Member Joined: 08 January 2007 Location: United States Status: Offline Points: 217 |
Post Options
Thanks(0)
|
This is still clobbered in 16.2.6
Replacing XTPTreeBase.cpp with version 15.3.1 still corrects the problems. Is there an official fix on the horizon? Do the CJ folks need 15.3.1 XTPTreeBase.cpp to compare? I could upload to you if you've lost it from SourceSafe or whatever source control you use. If it were me, I would start all over from 15.3.1 and add new material from that as a clean starting point taking care that none of the functionality gets trashed. It would be a lot easier than trying to kludge together a fix to the existing broken code. Even rolling it back would be preferable to the unusable state it's in now. |
|
MrFelix
Newbie Joined: 20 June 2013 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
In 16.3.0 that we've updated today this problem is fixed and lines are now supported. But there is some small trouble with state icons: Situation is we are having a dialog with a simple tree control containing items with child items and having lines. A state imagelist is assigned to the control and items can have a state image or not. When the dialog is opened there are lot of asserts because there are no valid item rectangles available. Looking at CXTPTreeBase::DrawItemIcons() the function must return immediately when GetItemRect() returns FALSE. In the same function when calculating rcStateIcon the X offset (nIconIdent + nStateImageSize) is applied twice with calls to OffsetRect(), resulting in overlapped expand/collapse/state images.
You should check these fixes for 16.3.1. |
|
Algae
Senior Member Joined: 08 January 2007 Location: United States Status: Offline Points: 217 |
Post Options
Thanks(0)
|
CJ please fix!
*Trying to make the current "theme" work for tree controls is a noble effort. While it is getting closer you can see it is still unusable. 15.3.1 Library captures. Example 1 - Spacing of item icons and text is correct. Example 2 - Position of expand/collapse buttons and line at root are correct. 16.3 Library captures. Example 1 - Note that the item icon widths are not handled correctly. The text overwrites. Example 2 - Note that the check boxes disregard the presence of the expand/collapse icons. Code snippet to create Example 1: void CMyTree::SetExplorerStyle() { if (XTPSystemVersion()->IsWinVistaOrGreater()) { if (!GetTreeCtrl().GetSafeHwnd()) return; SetWindowTheme(GetTreeCtrl().GetSafeHwnd(), L"explorer", NULL); GetTreeCtrl().ModifyStyle(TVS_HASLINES, 0); DWORD dwExStyle = 0x0004; // TVS_EX_DOUBLEBUFFER; ::SendMessage(GetTreeCtrl().GetSafeHwnd(), TVM_SETEXTENDEDSTYLE, (WPARAM)dwExStyle, (LPARAM)dwExStyle); } } int CMyTree::OnCreate(LPCREATESTRUCT lpCreateStruct) { int result = -1; DWORD dwStyle = WS_VISIBLE|TVS_HASLINES|TVS_LINESATROOT|TVS_TRACKSELECT|TVS_HASBUTTONS|TVS_SHOWSELALWAYS|TVS_FULLROWSELECT; // TVS_SINGLEEXPAND| // single key expand if (m_treeCtrl.Create(dwStyle, CRect(0,0,0,0), this, IDC_TREE)) { SetExplorerStyle(); GetTreeCtrl().SetItemHeight(26); m_filter = -1; m_subfilter = -1; result = 0; } .... etc. Tree control properties for example 2. |
|
Felipe
Groupie Joined: 08 August 2003 Status: Offline Points: 17 |
Post Options
Thanks(0)
|
We had the same problem. We are now using finally 16.3.0 after doing the following modification in XTPTreeBase.cpp. It solved our case, though I presume it is not a general solution. I look forward to a final fix from codejock:
Before: rcStateIcon.top -= 1; // ? rcStateIcon.OffsetRect( -(nIconIdent + nStateImageSize), 0); After //rcStateIcon.top -= 1; // ? rcStateIcon.OffsetRect( -(nIconIdent + nStateImageSize) + 3, 0); |
|
Norika
Groupie Joined: 30 November 2006 Status: Offline Points: 70 |
Post Options
Thanks(0)
|
Where I was also updated to 16.4.0, I encountered this problem that check box is not displayed.
Although check box reblogged modify and recompile to be displayed correctly in immediately change the control of the theme, I would like to fundamental solution. |
|
mcmastl
Admin Group Joined: 14 April 2015 Status: Offline Points: 79 |
Post Options
Thanks(0)
|
We have informed our development team of the issue and will be looking into it. Thank you for bringing this to our attention. If the issue has been resolved please let us know.
|
|
Luke McMasters, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Algae
Senior Member Joined: 08 January 2007 Location: United States Status: Offline Points: 217 |
Post Options
Thanks(0)
|
v. 17.1 - still problems with tree control.
The placement of lines/icons/objects etc. is improved, but there is little control over skinning. For instance, if you don't want to use skinned expand/collapse buttons (in my case I'd like to use "explorer" type deltas regardless of skin for consistent appearance, there is no way to do so. Changing the skin always changes the control skinning regardless of programmed setting. Is there another way around this or an update planned soon that allows this capability (skin or not skin, skin everything except buttons)? |
|
Marco1
Senior Member Joined: 16 January 2004 Location: Germany Status: Offline Points: 251 |
Post Options
Thanks(0)
|
The vertical lines are still not centered, if the icons are bigger than normal.
This was working fine up to 15.3.1, broken in 16 and 17.1.0, too. I already reported this. Please, finally get this fixed!!! |
|
Algae
Senior Member Joined: 08 January 2007 Location: United States Status: Offline Points: 217 |
Post Options
Thanks(0)
|
In addition to bad line placement as noted in previous posts, triangle selection buttons are still unresolved.
Static or DLL doesn't seem to matter. CJ Vers: 15.3.1 vs 17.2.0 Sample: GUI_Explorer OS: Vista+. For my test I used Win 7. Compare: 1. Build using v15.3.1 XTPTreeBase.cpp/h from I think.. 2012!!! You will see normal tree control triangles. 2. Build using v17.2.0 XTPTreeBase.cpp/h. Tree control triangles are not shown. [+] buttons are. Anything using TreeBase fails. This is unusable and has been for years. |
|
agontarenko
Admin Group Joined: 25 March 2016 Status: Offline Points: 297 |
Post Options
Thanks(0)
|
Hello,
I'm glad to inform you that the issue (vertical lines are still not centered, if the icons are bigger than normal) has been fixed. The fix will be available in the next beta or final release. Regards, Artem Gontarenko |
|
cpede
Senior Member Joined: 13 August 2004 Location: Denmark Status: Offline Points: 668 |
Post Options
Thanks(0)
|
In the VisualStudio IDE Sample I get wrong spaces between expand/collapse icons when removing the TVS_LINESATROOT flag.
Please confirm that this is also fixed. -cpede
|
|
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64) Language: Visual Studio 2017 (C++) |
|
agontarenko
Admin Group Joined: 25 March 2016 Status: Offline Points: 297 |
Post Options
Thanks(0)
|
Hello cpede,
With next release will be fixed many bugs of CXTPTreeCtrl (this bug was fixed too). Also was added DPI scaling of tree icons. Please wait for release. Regards, Artem Gontarenko |
|
cpede
Senior Member Joined: 13 August 2004 Location: Denmark Status: Offline Points: 668 |
Post Options
Thanks(0)
|
Sounds great, remember to add option to enable/disable DPI scaling of icons, so we don't get the bad situation like with button icons which are awfully scaled, and we can't turn it off.
We still hope for SVG format support one day :-)
-cpede |
|
Product: Xtreme ToolkitPro (24.0.0)
Platform: Windows 10 (x64) Language: Visual Studio 2017 (C++) |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
Hi;
Using 17.3.0 I have strange lines appearing; most of them are interrupted when I use state icons too! See the screenshot below: Will this be fixed soon? When can we get an update for this? |
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
agontarenko
Admin Group Joined: 25 March 2016 Status: Offline Points: 297 |
Post Options
Thanks(0)
|
Hello Martin,
You use state icons only for leaf items and for node items not. It's right? In this way you have this problem? Regards Gontarenko Artem |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
YES! |
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
agontarenko
Admin Group Joined: 25 March 2016 Status: Offline Points: 297 |
Post Options
Thanks(0)
|
Could you please share you sample or modify our sample as for reproduce this bug?
I need to debug it. Regards Gontarenko Artem |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
I'll try to generate a small sample, but it will take time... |
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
agontarenko
Admin Group Joined: 25 March 2016 Status: Offline Points: 297 |
Post Options
Thanks(0)
|
Hello Martin,
I think, I have question from another user, look please this post http://forum.codejock.com/forum_posts.asp?TID=23295&PID=75768𒟸 if this bug really same then this has been already fixed in version 18.0 Regards, Gontarenko Artem |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
Perhaps it's the same?
I'll wait for the update and check it then. |
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
agontarenko
Admin Group Joined: 25 March 2016 Status: Offline Points: 297 |
Post Options
Thanks(0)
|
Look please pdf file in post http://forum.codejock.com/forum_posts.asp?TID=23295
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |