By "custom", am I to assume you mean making these objects from text and graphics?
If so, listboxes are relatively easy, you begin with a string array [0-L] for your entries, and an index integer to point to the first string entry that is to be on show. A series of N text lines show the N entries beginning at the pointer. The index (and slider) can move between 0 and L-N. Obviously if N>L, then there are more text lines than entries to show. This needs special handling.
Treeviews are more complex, and can be made in two ways: Linearly, by using an expanded tree with a "depth" reference for each entry. Or Referentially by making each node point to another vector where it's subtree is stored. The highest depth nodes are listed first, then depth two and so on. Both methods have advantages and disadvantages depending upon updating, retrieval, and the database size.
May I ask what it is for, how big, and how might it need to be manipulated?