Hi,
I like the JUCE just as other users do. I am trying to learn it using the JUCE Demo. I want to have two components on a document window: TreeView and a generic JUCE component. I modified FontAndTextDemo.cpp so that I could replace the ListBox with a TreeView. I have a TreeView on the left and TextEditor on the right. I also learned using the TreeViewDemo.cpp how to add and remove TreeViewItems.
Now, I want to replace the right-hand side TextEditor including sliders below it with a new JUCE component depending on TreeViewItem selected in TreeView on the left-hand side.
| | |
| TreeView | JUCE Component |
| | |
| | |
I seem to be able to achieve this goal in this way:
- When one of the following events occur from TreeViewItem,
virtual void itemClicked (const MouseEvent &e)
virtual void itemDoubleClicked (const MouseEvent &e)
virtual void itemSelectionChanged (bool isNowSelected)
I could use ownerView of TreeViewItem to call a method of TreeView. TreeView would call another method of TreeViewDemo class so that we could delete the current JUCE Component and new another JUCE Component.
The GUI that I want to have is similar to “Preferences” or “Configurations” of a gui program. It is similar to TabbedComponent in that TabbedComponent shows different components depending on different tabs. I want to use TreeView’s TreeViewItem instead of tabs.
I am wondering if there is a good approach for this. I am sure I may be in a wrong track because I just started to learn JUCE.
I will appreciate any help.
Thank you,
Sang Chul
