Combobox with TreeView as popoup lazarus / 31-LCL ---------------------------------------------------------------------- cappe · 2015-11-02 09:30 Hello, How can I do so that when I click on a combobox I will open a treeview for choice. At the end should be a combobox that when I click open a treeview. Who can help me? ---------------------------------------------------------------------- howardpc · 2015-11-02 10:44 Can you give a short example of the tree-structured data you want displayed? You probably don't need a combobox at all, but a custom component where the 'dropdown' is not a simple list, but a treeview. Is the data read-only, and you simply want to browse to select one branch of the tree, or do you want to be able to edit the treeview data as well select it? Or do you want multi-select functionality? ---------------------------------------------------------------------- cappe · 2015-11-02 11:03 Exactly. I need a custom component (es TEdit with button or combobox) where the 'dropdown' is not a simple list, but a treeview . The data is read only, a single selection and not editable, however, must be grouped as the treeview. The important thing is that it takes up little space and as a combo box with an edit button. ---------------------------------------------------------------------- howardpc · 2015-11-02 11:27 And the data? Are you talking about say a TMenu where the items are already arranged in a tree structure? Or a 'flat' stringlist-type of data array where the tree structure is found by analysing the depth of indentation of each string...? Or somthing else? ---------------------------------------------------------------------- taazz · 2015-11-02 11:30 Quote from: howardpc on November 02, 2015, 12:27:43 pmAnd the data? Are you talking about say a TMenu where the items are already arranged in a tree structure? Or a 'flat' stringlist-type of data array where the tree structure is found by analysing the depth of indentation of each string...? Or somthing else? Why does it make any difference? Take a look on the treeview control does it require to know anything about the data? why would a tree combobox would? ---------------------------------------------------------------------- cappe · 2015-11-02 11:43 I have a lot of data and need a treeview in a combo box or custom control. I have grouped them. I understand the idea of tmenu, but I do not know in advance the amount of data that I need. I think the treeview is the best choice. ---------------------------------------------------------------------- wp · 2015-11-02 12:34 There are some "TreeComboboxes" around for Delphi, I think jvcl has one. But you'll have to adapt it to Lazarus. Going the pure Lazarus way, you could have a look at TTimeEdit which uses a popup form to display hours in a stringgrid. You should replace the stringgrid by a treeview and add the required properties. All the basic code is there. ---------------------------------------------------------------------- taazz · 2015-11-02 12:50 Quote from: wp on November 02, 2015, 01:34:33 pmThere are some "TreeComboboxes" around for Delphi, I think jvcl has one. But you'll have to adapt it to Lazarus. That I would like to see. Quote from: wp on November 02, 2015, 01:34:33 pmGoing the pure Lazarus way, you could have a look at TTimeEdit which uses a popup form to display hours in a stringgrid. You should replace the stringgrid by a treeview and add the required properties. All the basic code is there. No its not it misses the most important part do not move the focus from the form the edit control is on. Other than that and if you do not mind flashing windows yeah its the same. ---------------------------------------------------------------------- cappe · 2015-11-02 15:47 For the moment I make a button that opens the treeview. When I have time and I'll make a component I'll tell you (if they can do it) Thank you ---------------------------------------------------------------------- cappe · 2015-11-02 16:52 For the moment I make a button that opens the treeview. When I have time and I'll make a component I'll tell you (if they can do it). Of course FREE Thank you ---------------------------------------------------------------------- wp · 2015-11-02 16:56 At the top-right of your postings there's a button "Modify" which you can use to edit a previous post of yours - no need to re-post for modifications.