Discussion:
Tree control, show lines between items
Alec Teal
2014-07-28 20:11:13 UTC
Permalink
Hello there,

I'd like the tree control to show lines connecting entries, that is
rather than:

a
b
c

To have

a
+-b
`-c

I've found a no-line style, but not a line style.

It's not in the header files but wxPython does it, so I have hope that
it is possible,

thanks,

Alec
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
David Connet
2014-07-28 20:44:26 UTC
Permalink
You need the wxTR_HAS_BUTTONS style. And maybe wxTR_LINES_AT_ROOT.
Dave
________________________________
Sent: Monday, July 28, 2014 1:11 PM
Subject: Tree control, show lines between items
Hello there,
I'd like the tree control to show lines connecting entries, that is
a
    b
    c
To have
a
+-b
  `-c
I've found a no-line style, but not a line style.
It's not in the header files but wxPython does it, so I have hope that
it is possible,
thanks,
Alec
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Alec Teal
2014-07-28 21:14:42 UTC
Permalink
Post by David Connet
You need the wxTR_HAS_BUTTONS style. And maybe wxTR_LINES_AT_ROOT.
Doesn't work, thanks. Nice to meet another Alec (I thought I was alone btw)

OS: GTK+ (Linux really)
WX: 2.8.something
Post by David Connet
Dave
------------------------------------------------------------------------
*Sent:* Monday, July 28, 2014 1:11 PM
*Subject:* Tree control, show lines between items
Hello there,
I'd like the tree control to show lines connecting entries, that is
a
b
c
To have
a
+-b
`-c
I've found a no-line style, but not a line style.
It's not in the header files but wxPython does it, so I have hope that
it is possible,
thanks,
Alec
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
or visit http://groups.google.com/group/wx-users
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
a***@arlross.demon.co.uk
2014-07-28 20:46:38 UTC
Permalink
OS? version?
wxWidgets version?

And have you looked at the "Appearance:" entry in:

http://docs.wxwidgets.org/3.0.0/classwx_tree_ctrl.html

Alec Ross

A Ross Computing Services (Arcs) Ltd.
w: http://www.a-train.co.uk

________________________________________
From: wx-***@googlegroups.com [wx-***@googlegroups.com] on behalf of Alec Teal [***@warwick.ac.uk]
Sent: 28 July 2014 21:11
To: wx-***@googlegroups.com
Subject: Tree control, show lines between items

Hello there,

I'd like the tree control to show lines connecting entries, that is
rather than:

a
b
c

To have

a
+-b
`-c

I've found a no-line style, but not a line style.

It's not in the header files but wxPython does it, so I have hope that
it is possible,

thanks,

Alec

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Alec Teal
2014-07-28 21:15:41 UTC
Permalink
Post by a***@arlross.demon.co.uk
OS? version?
wxWidgets version?
I have of course looked at that, there is no LINES style (only no
lines), also (this was in the wrong message):

Nice to meet another Alec (I thought I was alone btw)

OS: GTK+
WX: 2.8.something
Post by a***@arlross.demon.co.uk
http://docs.wxwidgets.org/3.0.0/classwx_tree_ctrl.html
Alec Ross
A Ross Computing Services (Arcs) Ltd.
w: http://www.a-train.co.uk
________________________________________
Sent: 28 July 2014 21:11
Subject: Tree control, show lines between items
Hello there,
I'd like the tree control to show lines connecting entries, that is
a
b
c
To have
a
+-b
`-c
I've found a no-line style, but not a line style.
It's not in the header files but wxPython does it, so I have hope that
it is possible,
thanks,
Alec
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
or visit http://groups.google.com/group/wx-users
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-07-28 23:14:38 UTC
Permalink
On Mon, 28 Jul 2014 21:11:13 +0100 Alec Teal wrote:

AT> I'd like the tree control to show lines connecting entries, that is
AT> rather than:
AT>
AT> a
AT> b
AT> c
AT>
AT> To have
AT>
AT> a
AT> +-b
AT> `-c
AT>
AT> I've found a no-line style, but not a line style.

You must be using wxTR_NO_LINES style actually, I don't see any other
explanation. wxTreeCtrl is generic, so it really should work the same way
for you as everybody else and if you look at the treectrl sample it does
show the lines if you toggle "Connecting lines" menu item there.

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Alec Teal
2014-07-28 23:38:58 UTC
Permalink
AT> I'd like the tree control to show lines connecting entries, that is
AT>
AT> a
AT> b
AT> c
AT>
AT> To have
AT>
AT> a
AT> +-b
AT> `-c
AT>
AT> I've found a no-line style, but not a line style.
You must be using wxTR_NO_LINES style actually, I don't see any other
explanation. wxTreeCtrl is generic, so it really should work the same way
for you as everybody else and if you look at the treectrl sample it does
show the lines if you toggle "Connecting lines" menu item there.
I didn't compile the sample but I did look at it. I wont bother posting
my code because it is basically 4 lines (creating the tree ctrl, putting
it in a sizer, adding some items)

With the default style there are no lines and I've tried many
permutations before actually posting here.
I can't get lines!

I can read though, and I did try what the sample would do with
"Connecting lines" checked.

Thanks for your help,

Alec
Regards,
VZ
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-07-28 23:41:10 UTC
Permalink
On Tue, 29 Jul 2014 00:38:58 +0100 Alec Teal wrote:

AT> I didn't compile the sample but I did look at it.

I'd suggest that you compile it and check whether it works. It's the
simplest way to clear the mystery.

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Alec Teal
2014-07-29 00:00:19 UTC
Permalink
AT> I didn't compile the sample but I did look at it.
I'd suggest that you compile it and check whether it works. It's the
simplest way to clear the mystery.
I'd almost agree. BUT there are two functions one must look at to work
out what the toggle connections
menu item actually does.

I have tried wxTC_DEFAULT_STYLE and wxTC_DEFAULT_STYLE^wxTC_NO_LINES
which is precisely what the sample would do (as well as other
permutations) and there are no lines.

I've also tested this on two computers now (one running a much older OS
~ 2 years older, also GTK) and there are no lines.

It also isn't my code, when searching for bugs I have always distilled
the problem down and down until just a few lines illustrate it, or I
find the bug. This is quite literally create a tree ctrl, stick it in a
sizer, add some items, observe.

Can someone confirm this? (I have results for: Linux Mint (MATE) 13 and
Linux Mint (MATE) 17), I've also checked, it's not my colourscheme.
Regards,
VZ
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...