Article View: comp.os.msdos.programmer
Article #23Re: Boxes and Windows ...
From: Christopher Rickard
Date: Wed, 28 Oct 1992 18:35
Date: Wed, 28 Oct 1992 18:35
22 lines
1780 bytes
1780 bytes
Bill,
Are you using OWL? Assuming you are, how are you trying to use the listbox. Is it multicolumn? Is may not have a good "reason" to scroll horizontally? If the list items exceed the width of the box, then adding a horizontal scroll bar will be useful.
As far as filling ComboBoxes (or for that matter Listboxes), you can use the AddString or InsertString member functions (both of which originate from the TListBox class - TComboBox inherits it from TListBox).
There are then two ways that you can manipulate data for the combobox. The first uses the TComboBox class. It is most useful when you want to be able to add, insert and delete info in your 'box but don't necessarily want to save the state of the control between executions of the window/dialog it belongs to. You can AddString to the listbox given a pointer to the listbox:
PTComboBox YourComboBox;
.
.
.
YourComboBox->AddString("a character string");
Or you can declare an instance of the TComboBoxData class which constructs said object with an empty array of strings. This is useful for TDialog's transfer capability.
Examples can be found in the Borland OWL\EXAMPLES directory under CBOXTEST.CPP and CBXTEST.CPP (respectively I believe - don't hold me to the spelling :-)
Hope this helps.
++ C ++
Technical Details
Message-ID:
<1992Oct28.183554.13600@srg.srg.af.mil>Path:
arc1-ca.pugleaf.net!sparky!uunet!srg!crickardReferences:
<1992Oct22.235623.4192@spcvxb.spc.edu> <1992Oct27.214700.3142@sea.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer,comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!srg!crickard From: crickard@neptunesrg.af.mil (Christopher Rickard) Subject: Re: Boxes and Windows ... Organization: ARINC Research, Corp. Date: Wed, 28 Oct 92 18:35:54 GMT Message-ID: <1992Oct28.183554.13600@srg.srg.af.mil> References: <1992Oct22.235623.4192@spcvxb.spc.edu> <1992Oct27.214700.3142@sea.com> Sender: crickard@neptune (Christopher Rickard) Lines: 22