[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]] ==== Hierarchical List Box Question (OpenInsight Specific) ==== === At 18 NOV 1997 10:37:54AM Dave Pociu wrote: === {{tag>"OpenInsight Specific"}} How can you expand or collapse a certain topic in a hierachical box ? For example let's say the expanded list box info looked like this: Topic1 Line 1 Line 2 Topic 2 Line 1 Line 2 Topic 3 Line 1 Line 2 Line 3 What I would like to do is programatically collapse just Topic2 so the screen will look like this : Topic1 Line 1 Line 2 Topic 2 Topic 3 Line 1 Line 2 Line 3 Also, on the same note, how can I initialize one of this list boxes so that when it first displays the info it is either all collapsed , all expanded or a combination of expanded and collapsed topics? Dave Pociu ---- === At 18 NOV 1997 10:43AM Dave Pociu wrote: === In the previous example, all the Line x lines were indented by a few spaces. They are supposed to be subs for the Topic x lines. Just clarifying... ---- === At 19 NOV 1997 08:21AM Oystein Reigem wrote: === Dave, ] Use the Send_Message function. See on-line help on [i]Send_Message[/i] and the [i]EXPAND[/i] message. ] UnUsed=Send_Message( ListBoxCtrlId, "EXPAND", 4, 0 ) /* 4 because Topic2 is line 4 */ /* 0 because you want that line expanded to 0 more levels, in other words collapsed */ ] I assume you have initialized your list box at design time, i.e in Form Designer. I think there are two alternatives: Either as soon as possible send the necessary collapse messages. Or - if this causes too much flickering - leave the list box empty at design time and initialize it programatically instead. If you want to programatically initialize the list box it's easiest when you want everything expanded, because then you can set the fairly straightforward LIST property. When you want collapsed nodes, you must use the more complicated LIST_EX property instead. I haven't really used the LIST_EX property myself yet, i.e I have tried to set LIST_EX in a more complex setting and not succeeded completely. But I think you will succeed as long as you do it just once as an init and not try to change it after the user has started using it. Please tell me if you need any help. - Oystein - ---- === At 19 NOV 1997 09:02AM Dave Pociu wrote: === Oystein, Thanks for the help. A little dirrection was all I needed so I don't waste too much time on what functions and properties deal with these list boxes. I can definitely continue from here. Dave ---- === At 19 NOV 1997 09:44AM Dave Pociu wrote: === There should be a whole paper in the next Works issue devoted to Hierarchical Boxes that answers all the questions I asked above and more. I just got the "sneak-peak" of it e-mailed to me from a very helpful person at Revelation. ---- === At 20 NOV 1997 09:30AM Oystein Reigem wrote: === Dave, What about a sneak-peek for me too? :-) - Oystein - oystein.reigem@hd.uib.no ---- === At 20 NOV 1997 09:48AM Dave Pociu wrote: === [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=3395DC4D663B8A7D852565530055DE31|View this thread on the forum...]]