From: MartinLemburg on
Hello,

I want to build a tree inside a tree widget, where each node has a
checkbox.

I tried with BWidgets Tree widget and it works using windows (here a
checkbutton widget) instead of an image.
But it looks strange, because the Tk checkbutton has always an node
text overlapping extension on the right side, no matter if a text/
image is specified and it is not possible to specify a text/image to
be drawn on the left side. And the checkbutton can not be transparent
to let the tree background seen through the checkbutton.

Than I started reading the documentation from the treectrl and ... it
seems to be horrible complicated to build a tree even if no hokuspokus
is involved to try to show checkboxes next to each node.
I even have problems following the naming conventions ... it doesn't
seem to fit into my head! :/

Has anyone a suggestion how to start this?

Thanks in advance!

Best regards,

Martin
From: Georgios Petasis on
στις 11/2/2010 22:18, O/H MartinLemburg(a)Siemens-PLM έγραψε:
> Hello,
>
> I want to build a tree inside a tree widget, where each node has a
> checkbox.
>
> I tried with BWidgets Tree widget and it works using windows (here a
> checkbutton widget) instead of an image.
> But it looks strange, because the Tk checkbutton has always an node
> text overlapping extension on the right side, no matter if a text/
> image is specified and it is not possible to specify a text/image to
> be drawn on the left side. And the checkbutton can not be transparent
> to let the tree background seen through the checkbutton.
>
> Than I started reading the documentation from the treectrl and ... it
> seems to be horrible complicated to build a tree even if no hokuspokus
> is involved to try to show checkboxes next to each node.
> I even have problems following the naming conventions ... it doesn't
> seem to fit into my head! :/
>
> Has anyone a suggestion how to start this?
>
> Thanks in advance!
>
> Best regards,
>
> Martin

What if you tried with ttk checkbutton?
I have also used BWidgets for this in the past, and yes I also would
like a better solution. If I try this again, I will try with
ttk::treeview and images, similar to what tablelist does:

http://www.nemethi.de/tablelist/tablelist.html

George
From: Jeremy on
On Feb 11, 4:06 pm, Georgios Petasis <peta...(a)iit.demokritos.gr>
wrote:
>
> What if you tried with ttk checkbutton?
> I have also used BWidgets for this in the past, and yes I also would
> like a better solution. If I try this again, I will try with
> ttk::treeview and images, similar to what tablelist does:
>
> http://www.nemethi.de/tablelist/tablelist.html
>

I was recently pointed to TkTreectrl for one of my projects and I'm
sold! It has a steep learning curve, so if you want somthing quick, it
may not be the place to go but once you learn it, I'm pretty confident
it will serve almost any need.

http://wiki.tcl.tk/6064

It will do the checkbox just fine, but it does take some coding to
accomplish. It, however, does have many samples, one of which is how
to accomplish a checkbox.

Jeremy