Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - CXTPTreeCtrl - HasLines = doesn't
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPTreeCtrl - HasLines = doesn't

 Post Reply Post Reply
Author
Message
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Topic: CXTPTreeCtrl - HasLines = doesn't
    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?


Back to Top
ilya View Drop Down
Groupie
Groupie


Joined: 07 May 2012
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote ilya Quote  Post ReplyReply Direct Link To This Post Posted: 31 May 2013 at 1:42pm
This is a known issue, it's been recorded in the internal bug tracking system and will be solved
Back to Top
prekopj View Drop Down
Newbie
Newbie
Avatar

Joined: 02 November 2011
Location: Slovak Republic
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote prekopj Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2013 at 6:56am
I have version 16.2.0 but this problem is not corrected. When will be fixed?
Back to Top
jbriguet View Drop Down
Newbie
Newbie


Joined: 27 March 2013
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote jbriguet Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2013 at 3:53am
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 189
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 28 June 2013 at 11:30am
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!

Product: XTP 15.3.2 (an own fork of 15.3.1 on VS2015)

Platform: VS2015 / Windows 10 (64bit)
Back to Top
ilya View Drop Down
Groupie
Groupie


Joined: 07 May 2012
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote ilya Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2013 at 1:18am
Treelines are fixed in 16.2.1

Please attach a sample project to illustrate icons spacing issue 
Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2013 at 9:14pm
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
Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 11 August 2013 at 2:58pm
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.
Back to Top
roan98dk View Drop Down
Groupie
Groupie


Joined: 13 February 2011
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote roan98dk Quote  Post ReplyReply Direct Link To This Post Posted: 14 August 2013 at 3:08pm
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.
Back to Top
grudy View Drop Down
Groupie
Groupie


Joined: 02 November 2004
Location: United States
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote grudy Quote  Post ReplyReply Direct Link To This Post Posted: 06 November 2013 at 9:48am
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

Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2014 at 7:10pm
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.
Back to Top
MrFelix View Drop Down
Newbie
Newbie


Joined: 20 June 2013
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote MrFelix Quote  Post ReplyReply Direct Link To This Post Posted: 07 February 2014 at 7:40am
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.
Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2014 at 4:40pm
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.


Back to Top
Felipe View Drop Down
Groupie
Groupie


Joined: 08 August 2003
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote Felipe Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2014 at 3:57am
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);
Back to Top
Norika View Drop Down
Groupie
Groupie
Avatar

Joined: 30 November 2006
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote Norika Quote  Post ReplyReply Direct Link To This Post Posted: 11 December 2014 at 11:45pm
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.
Back to Top
mcmastl View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 April 2015
Status: Offline
Points: 79
Post Options Post Options   Thanks (0) Thanks(0)   Quote mcmastl Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2015 at 12:46pm
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
Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2016 at 2:24pm
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)?
Back to Top
Marco1 View Drop Down
Senior Member
Senior Member


Joined: 16 January 2004
Location: Germany
Status: Offline
Points: 189
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marco1 Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2016 at 3:48am
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!!!



Product: XTP 15.3.2 (an own fork of 15.3.1 on VS2015)

Platform: VS2015 / Windows 10 (64bit)
Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 30 May 2016 at 2:33pm
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. Cry
Back to Top
agontarenko View Drop Down
Admin Group
Admin Group


Joined: 25 March 2016
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote agontarenko Quote  Post ReplyReply Direct Link To This Post Posted: 07 June 2016 at 11:09am
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
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Status: Offline
Points: 463
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Posted: 10 February 2017 at 7:34am
In the VisualStudio IDE Sample I get wrong spaces between expand/collapse icons when removing the TVS_LINESATROOT flag.

case themeVS2010:
m_wndClassView.SetTheme(xtpControlThemeVisualStudio2010);
m_wndClassView.ModifyStyle(TVS_HASLINES, 0);
m_wndClassView.ModifyStyle(TVS_LINESATROOT, 0);



Please confirm that this is also fixed.

-cpede
Product: Xtreme ToolkitPro (17.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2015 (C++) - Update 3
Back to Top
agontarenko View Drop Down
Admin Group
Admin Group


Joined: 25 March 2016
Status: Offline
Points: 57
Post Options Post Options   Thanks (0) Thanks(0)   Quote agontarenko Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2017 at 2:48pm
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
Back to Top
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Status: Offline
Points: 463
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2017 at 6:25am
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 (17.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2015 (C++) - Update 3
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.109 seconds.