Feasibility check: CustomTreeCtrl

I want to ask the community about this before I delve further into it. I have a set of hierarchical data, sets say it looks like this:

root

  • Category 1
    • Item 1
      • SubItem 1
      • SubItem 2
    • Item 2
      - SubItem 3
      - SubItem 4
      - SubItem 5
      - SubItem 6
  • Category 2
    • Item 3
      - SubItem 7
      - SubItem 8
  • Category 3
    • Item 4
      - SubItem 9
    • Item 5
      - SubItem 10
      - SubItem 11
    • Item 6
      - SubItem 12

``

You can see that everything is unique - there is no item that is duplicated anywhere.

Instead of having a visible tree, I was hoping for an accordion-type functionality, where every level deeper you go expands the list further, or maybe one where every level replaces the current page and displays the sub levels. The demo shows that CustomTreeCtrl is very customizable, but it still shows the visual tree that I do not want. Would I be able to customize it to meet my needs visually? Also, any references or tutorials would be welcome!

I don’t understand what you’re asking for. What do you mean accordian-like? If you mean that branches collapse when you open other branches, that’s easy in a tree control.

···

On Aug 15, 2015 11:03 PM, “Ryan Holmes” ryan.xgamer99@gmail.com wrote:

I want to ask the community about this before I delve further into it. I have a set of hierarchical data, sets say it looks like this:

root

  • Category 1
    • Item 1
      • SubItem 1
      • SubItem 2
    • Item 2
      - SubItem 3
      - SubItem 4
      - SubItem 5
      - SubItem 6
  • Category 2
    • Item 3
      - SubItem 7
      - SubItem 8
  • Category 3
    • Item 4
      - SubItem 9
    • Item 5
      - SubItem 10
      - SubItem 11
    • Item 6
      - SubItem 12

``

You can see that everything is unique - there is no item that is duplicated anywhere.

Instead of having a visible tree, I was hoping for an accordion-type functionality, where every level deeper you go expands the list further, or maybe one where every level replaces the current page and displays the sub levels. The demo shows that CustomTreeCtrl is very customizable, but it still shows the visual tree that I do not want. Would I be able to customize it to meet my needs visually? Also, any references or tutorials would be welcome!

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Let me give a bit of background and go more indepth now that I’ve had some sleep =P. I work with a dataset that is currently hardcoded into three stages: Categories > Ships > Fits. We have custom widgets that are drawn to represent these three items that are subclassed from wx.Window. However, we are hard limited by having only three stages. Every stage gets a list of items to display from the database, and when one item is clicked, the next stage get the parent’s children and displays them. If we we wish to introduce another level, we would have to support another stage in the underlying codebase. To combat this, I was thinking of restructuring the data into a TreeCtrl, which will give us better flexibility on how we order the hierarchy and how many levels we have. But, I would also like to be able to keep our custom widgets that are used to visually represent these items.

Here’s some screen shots of the current program, and the one with TreeCtrl

Current: http://imgur.com/6dYgagU You can see we select Assault Ships, which shows a list of all Assault Ships, then Retribution, which displays a list of all the users saved fits for that particular ship. This has the concept of pages that I was discussing: when you select an item, the panel is cleared and the new content shows up. But the dataset behind it is cumbersome and hardcoded to only three levels.

TreeCtrl: http://imgur.com/i8tvNnT This is the dataset that I want, but I would like to keep the same GUI widgets that we have developed (or, as stated, turn it into an accordion-type widget) to keep the same overall look and feel.

So basically what I’m asking is if I can completely control the way the items look in a CustomTreeCtrl? And then, as a bonus, any tutorials on how one might do this would be helpful, because i have no idea. =)

···

On Sun, Aug 16, 2015 at 9:50 AM, David Woods david@badgerchildhoodcancer.org wrote:

I don’t understand what you’re asking for. What do you mean accordian-like? If you mean that branches collapse when you open other branches, that’s easy in a tree control.

On Aug 15, 2015 11:03 PM, “Ryan Holmes” ryan.xgamer99@gmail.com wrote:

I want to ask the community about this before I delve further into it. I have a set of hierarchical data, sets say it looks like this:

root

  • Category 1
    • Item 1
      • SubItem 1
      • SubItem 2
    • Item 2
      - SubItem 3
      - SubItem 4
      - SubItem 5
      - SubItem 6
  • Category 2
    • Item 3
      - SubItem 7
      - SubItem 8
  • Category 3
    • Item 4
      - SubItem 9
    • Item 5
      - SubItem 10
      - SubItem 11
    • Item 6
      - SubItem 12

``

You can see that everything is unique - there is no item that is duplicated anywhere.

Instead of having a visible tree, I was hoping for an accordion-type functionality, where every level deeper you go expands the list further, or maybe one where every level replaces the current page and displays the sub levels. The demo shows that CustomTreeCtrl is very customizable, but it still shows the visual tree that I do not want. Would I be able to customize it to meet my needs visually? Also, any references or tutorials would be welcome!

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/ciIERbI85-Q/unsubscribe.

To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

I think something like this: Vertical accordion menu using jQuery and CSS3 is what he is looking for.

···

On Sunday, August 16, 2015 at 3:50:24 PM UTC+2, David Woods wrote:

I don’t understand what you’re asking for. What do you mean accordian-like? If you mean that branches collapse when you open other branches, that’s easy in a tree control.

On Aug 15, 2015 11:03 PM, “Ryan Holmes” ryan.x...@gmail.com wrote:

I want to ask the community about this before I delve further into it. I have a set of hierarchical data, sets say it looks like this:

root

  • Category 1
    • Item 1
      • SubItem 1
      • SubItem 2
    • Item 2
      - SubItem 3
      - SubItem 4
      - SubItem 5
      - SubItem 6
  • Category 2
    • Item 3
      - SubItem 7
      - SubItem 8
  • Category 3
    • Item 4
      - SubItem 9
    • Item 5
      - SubItem 10
      - SubItem 11
    • Item 6
      - SubItem 12

``

You can see that everything is unique - there is no item that is duplicated anywhere.

Instead of having a visible tree, I was hoping for an accordion-type functionality, where every level deeper you go expands the list further, or maybe one where every level replaces the current page and displays the sub levels. The demo shows that CustomTreeCtrl is very customizable, but it still shows the visual tree that I do not want. Would I be able to customize it to meet my needs visually? Also, any references or tutorials would be welcome!

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hi Ryan,

I've just used standard wxTreeCtrls, not CustomTreeCtrls, but I

assume the CustomTreeCtrl has a lot more flexibility for
customization. Sorry I can’t help you with that particular
control. But look at the wxPython Demo, which includes sample
programs for just about every control in wxPython. You should be
able to figure out what you need to know from that.

A second option you have would be to have a tree control in one

window and a display in a second window that shows details about
whatever is selected in the treecontrol. That, in an
over-simplified way is what I do with my application. Users use the
Tree Control to indicate what data they want to work with, and I
then populate a series of other windows with text documents, video
files, waveform diagrams, maps that show coding across documents or
media files, etc. etc. depending on what type of data they’ve
selected.

David
···

On 08/16/2015 12:14 PM, Ryan Holmes
wrote:

    Let me give a bit of background and go more indepth

now that I’ve had some sleep =P. I work with a dataset that is
currently hardcoded into three stages: Categories > Ships

Fits. We have custom widgets that are drawn to represent
these three items that are subclassed from wx.Window.
However, we are hard limited by having only three stages. Every
stage gets a list of items to display from the database, and
when one item is clicked, the next stage get the parent’s
children and displays them. If we we wish to introduce another
level, we would have to support another stage in the underlying
codebase. To combat this, I was thinking of restructuring the
data into a TreeCtrl, which will give us better flexibility on
how we order the hierarchy and how many levels we have. But, I
would also like to be able to keep our custom widgets that are
used to visually represent these items.

      Here's some screen shots of the current program, and the

one with TreeCtrl

Current: http://imgur.com/6dYgagU
You can see we select Assault Ships, which shows a list of all
Assault Ships, then Retribution, which displays a list of all
the users saved fits for that particular ship. This has the
concept of pages that I was discussing: when you select an
item, the panel is cleared and the new content shows up. But
the dataset behind it is cumbersome and hardcoded to only
three levels.

TreeCtrl: http://imgur.com/i8tvNnT
This is the dataset that I want, but I would like to keep the
same GUI widgets that we have developed (or, as stated, turn
it into an accordion-type widget) to keep the same overall
look and feel.

          So basically what I'm asking is if I can completely

control the way the items look in a CustomTreeCtrl? And
then, as a bonus, any tutorials on how one might do this
would be helpful, because i have no idea. =)

      On Sun, Aug 16, 2015 at 9:50 AM, David

Woods david@badgerchildhoodcancer.org
wrote:

          I don't understand what you're asking for. What

do you mean accordian-like? If you mean that branches
collapse when you open other branches, that’s easy in a
tree control.

              On Aug 15, 2015 11:03 PM, "Ryan Holmes"

<ryan.xgamer99@gmail.com >
wrote:

                  I want to ask the community about

this before I delve further into it. I have a set
of hierarchical data, sets say it looks like this:

root

                            - Category 1

                                - Item 1

                                    - SubItem 1

                                    - SubItem 2

                              - Item 2

                                    - SubItem 3

                                    - SubItem 4

                                    - SubItem 5

                                    - SubItem 6

                            - Category 2

                              - Item 3

                                    - SubItem 7

                                    - SubItem 8

                            - Category 3

                              - Item 4

                                    - SubItem 9

                              - Item 5

                                    - SubItem 10

                                    - SubItem 11

                              - Item 6

                                    - SubItem 12

``

                    You can see that everything is unique - there is

no item that is duplicated anywhere.

                    Instead of having a visible tree, I was

hoping for an accordion-type functionality,
where every level deeper you go expands the list
further, or maybe one where every level replaces
the current page and displays the sub levels.
The demo shows that CustomTreeCtrl is very
customizable, but it still shows the visual tree
that I do not want. Would I be able to customize
it to meet my needs visually? Also, any
references or tutorials would be welcome!

            You received this message because you are subscribed to

the Google Groups “wxPython-users” group.

            To unsubscribe from this group and stop receiving emails

from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

              For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

            You received this message because you are subscribed to

a topic in the Google Groups “wxPython-users” group.

            To unsubscribe from this topic, visit [https://groups.google.com/d/topic/wxpython-users/ciIERbI85-Q/unsubscribe](https://groups.google.com/d/topic/wxpython-users/ciIERbI85-Q/unsubscribe).

            To unsubscribe from this group and all its topics, send

an email to wxpython-users+unsubscribe@googlegroups.com.

            For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

  You received this message because you are subscribed to the Google

Groups “wxPython-users” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to wxpython-users+unsubscribe@googlegroups.com.

  For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

The CustomTreeCtrl demo shows a lot of information, but it still shows it as a visual tree with branches. I’ll continue looking through it and the docs for more info.

Your example would not work for our situation unfortunately. We use that in another TreeCtrl we have, were we have a market and once you get to the end of the tree branch it shows all items in that market group. But for this particular situation it is not effect, as we don’t want the visual tree but instead have more control over how we draw each item.

···

On Mon, Aug 17, 2015 at 11:01 AM, David Woods transana@gmail.com wrote:

Hi Ryan,

I've just used standard wxTreeCtrls, not CustomTreeCtrls, but I

assume the CustomTreeCtrl has a lot more flexibility for
customization. Sorry I can’t help you with that particular
control. But look at the wxPython Demo, which includes sample
programs for just about every control in wxPython. You should be
able to figure out what you need to know from that.

A second option you have would be to have a tree control in one

window and a display in a second window that shows details about
whatever is selected in the treecontrol. That, in an
over-simplified way is what I do with my application. Users use the
Tree Control to indicate what data they want to work with, and I
then populate a series of other windows with text documents, video
files, waveform diagrams, maps that show coding across documents or
media files, etc. etc. depending on what type of data they’ve
selected.

David







  On 08/16/2015 12:14 PM, Ryan Holmes

wrote:

    Let me give a bit of background and go more indepth

now that I’ve had some sleep =P. I work with a dataset that is
currently hardcoded into three stages: Categories > Ships

Fits. We have custom widgets that are drawn to represent
these three items that are subclassed from wx.Window.
However, we are hard limited by having only three stages. Every
stage gets a list of items to display from the database, and
when one item is clicked, the next stage get the parent’s
children and displays them. If we we wish to introduce another
level, we would have to support another stage in the underlying
codebase. To combat this, I was thinking of restructuring the
data into a TreeCtrl, which will give us better flexibility on
how we order the hierarchy and how many levels we have. But, I
would also like to be able to keep our custom widgets that are
used to visually represent these items.

      Here's some screen shots of the current program, and the

one with TreeCtrl

Current: http://imgur.com/6dYgagU
You can see we select Assault Ships, which shows a list of all
Assault Ships, then Retribution, which displays a list of all
the users saved fits for that particular ship. This has the
concept of pages that I was discussing: when you select an
item, the panel is cleared and the new content shows up. But
the dataset behind it is cumbersome and hardcoded to only
three levels.

TreeCtrl: http://imgur.com/i8tvNnT
This is the dataset that I want, but I would like to keep the
same GUI widgets that we have developed (or, as stated, turn
it into an accordion-type widget) to keep the same overall
look and feel.

          So basically what I'm asking is if I can completely

control the way the items look in a CustomTreeCtrl? And
then, as a bonus, any tutorials on how one might do this
would be helpful, because i have no idea. =)

  You received this message because you are subscribed to the Google

Groups “wxPython-users” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to wxpython-users+unsubscribe@googlegroups.com.

  For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/ciIERbI85-Q/unsubscribe.

To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

      On Sun, Aug 16, 2015 at 9:50 AM, David

Woods david@badgerchildhoodcancer.org
wrote:

          I don't understand what you're asking for. What

do you mean accordian-like? If you mean that branches
collapse when you open other branches, that’s easy in a
tree control.

              On Aug 15, 2015 11:03 PM, "Ryan Holmes"

<ryan.xgamer99@gmail.com >
wrote:

                  I want to ask the community about

this before I delve further into it. I have a set
of hierarchical data, sets say it looks like this:

root

                            - Category 1

                                - Item 1

                                    - SubItem 1

                                    - SubItem 2

                              - Item 2

                                    - SubItem 3

                                    - SubItem 4

                                    - SubItem 5

                                    - SubItem 6

                            - Category 2

                              - Item 3

                                    - SubItem 7

                                    - SubItem 8

                            - Category 3

                              - Item 4

                                    - SubItem 9

                              - Item 5

                                    - SubItem 10

                                    - SubItem 11

                              - Item 6

                                    - SubItem 12

``

                    You can see that everything is unique - there is

no item that is duplicated anywhere.

                    Instead of having a visible tree, I was

hoping for an accordion-type functionality,
where every level deeper you go expands the list
further, or maybe one where every level replaces
the current page and displays the sub levels.
The demo shows that CustomTreeCtrl is very
customizable, but it still shows the visual tree
that I do not want. Would I be able to customize
it to meet my needs visually? Also, any
references or tutorials would be welcome!

            You received this message because you are subscribed to

the Google Groups “wxPython-users” group.

            To unsubscribe from this group and stop receiving emails

from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

              For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

            You received this message because you are subscribed to

a topic in the Google Groups “wxPython-users” group.

            To unsubscribe from this topic, visit [https://groups.google.com/d/topic/wxpython-users/ciIERbI85-Q/unsubscribe](https://groups.google.com/d/topic/wxpython-users/ciIERbI85-Q/unsubscribe).

            To unsubscribe from this group and all its topics, send

an email to wxpython-users+unsubscribe@googlegroups.com.

            For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).