Re: [WIN] "open" simple combo box programmatically
- Posted by Derek Parnell <dparnell at BIGPOND.NET.AU> Oct 21, 2000
- 572 views
Sorry Dan, its my fault. I didn't express myself very clearly. I'm suggesting that you drop the idea of using a COMBOBOX for the second list, and instead use a LISTBOX control. Then programatically control the visualisation of it so that it "unfolds" by changing its height and "folds" again also by changing its height. In other words, why do you want the user to click on the second box? My guess is that you don't actually want that. Instead you want the user to see the contents at all times - without clicking. The pseudo code would go something like this... onClick_FirstBox: get item in first box. clear second box. set height of second box to one char high. add items to second box based on item in first box. set height of second box so that 'x' lines are visible. if 'x' < actual number of items, set a vertical scrollbar for the second box. end onClick. This would give the impression that the second box is automatically expanding/contracting based on its contents. There is no need to click on anything. Just use a LISTBOX rather than a COMBOBOX. ----- cheers Derek ------ Derek Parnell Melbourne, Australia (Vote [1] The Cheshire Cat for Internet Mascot) ----- Original Message ----- From: "Dan B Moyer" <DANMOYER at PRODIGY.NET> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Friday, October 20, 2000 6:38 PM Subject: Re: [WIN] "open" simple combo box programmatically > Derek, > > No, that's not it, (I think), the size seems to be working automatically and > just fine, as each new list of items is put into the second list on choosing > a category from the first, the first element of that list shows up in the > "edit" portion of the second; if the user *clicks* on that displayed > element, *then* the list "unfolds" to show all elements, and it does so just > fine, it's a big box for many items, and a small box for few. It's the > "unfolding" I'm trying to cause programmatically as soon as an item > (category) is clicked on in the first. > > My ISP is doing maintenance & will stop sending me email in about a half > hour. > > Dan > > > ----- Original Message ----- > From: "Derek Parnell" <dparnell at BIGPOND.NET.AU> > To: <EUPHORIA at LISTSERV.MUOHIO.EDU> > Sent: Friday, October 20, 2000 12:28 AM > Subject: Re: [WIN] "open" simple combo box programmatically > > > > It sounds like the second box needs to be a list box who's height you > > control programatically. Each time a category is selected in the first > box, > > clear the second one and populate it with the related data and recalculate > > it's height. You can set a maximum height and add a scroll bar if > required. > > > > ------ > > Derek Parnell > > Melbourne, Australia > > (Vote [1] The Cheshire Cat for Internet Mascot) > > > > ----- Original Message ----- > > From: "Dan B Moyer" <DANMOYER at PRODIGY.NET> > > To: <EUPHORIA at LISTSERV.MUOHIO.EDU> > > Sent: Friday, October 20, 2000 6:20 PM > > Subject: [WIN] "open" simple combo box programmatically > > > > > > > Is it possible to "open" a simple combo box programmatically? > > > > > > By that I mean, if you have a simple combo box and you click on the > > element > > > of the list that's displayed in the "edit" box portion of it, then the > > > *list* unfolds & is displayed; but can you force it to "open" or > "unfold" > > > programmatically? > > > > > > I have two related combo boxes, one has *categories* of things, the > other > > is > > > then populated with the appropriate things depending on what category is > > > chosen, but I want the second combo box to automatically unfold when a > > > category is chosen in the first combo box. Can this be done, & if so > how? > > > > > > Dan Moyer