Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tool palette - 3 objects required....HELP !!

Status
Not open for further replies.

Riverman1111

Programmer
Feb 11, 2009
15
US
Hello,i'm a newbie with C++Builder, and need to learn it and C++ immediately. So far so good.

Wondering if some kind soul can help me locate a few tools:

1) an object where I can enter text (description) and it allows for scrolling if the text is too long for the object?

2) I need an object which allows me to move items up down, drag and drop, to determine the order. Any ideas?

3) I need an object which is similar to a Gant chart, allows moving objects on a grid, for time vs resource. ?

Thanks so much!!!

Riverman1111
 
Just off the top of my head...


1) Look at the memo box.

2) Look at the memo box or combo box.

3) You may need a third party component.

A good place to look is C++Builder Developers Journal. They have some issues that free for public view.



James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Great, thanks very much!

I'll look around for some 3rd party stuff for the Gant chart object.

Another question, if you don't mind. I have a combo box which I have connected to a dataset but doesn't list the values when it drops down.

I want a combo box which allows me to select a value, then use that value to execute a query to return values for that id. Seems like that should be simple, but I can't figure it out. Any ideas?

Thanks again for your help, very much appreciated.
 
Are you using the TComboBox, TDBComboBox, or the TDBLookupComboBox?


James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Normally, with the DB Combo Box, you link the box to a data set and then to a field in the table.

From the manual said:
Displaying and editing data in lookup list and combo boxes

Lookup list boxes and lookup combo boxes (TDBLookupListBox and TDBLookupComboBox) present the user with a restricted list of choices from which to set a valid field value. When a user selects a list item, the corresponding field value is changed in the underlying dataset.
For example, consider an order form whose fields are tied to the OrdersTable. OrdersTable contains a CustNo field corresponding to a customer ID, but OrdersTable does not have any other customer information. The CustomersTable, on the other hand, contains a CustNo field corresponding to a customer ID, and also contains additional information, such as the customer’s company and mailing address. It would be convenient if the order form enabled a clerk to select a customer by company name instead of customer ID when creating an invoice. A TDBLookupListBox that displays all company names in CustomersTable enables a user to select the company name from the list, and set the CustNo on the order form appropriately.

These lookup controls derive the list of display items from one of two sources:

A lookup field defined for a dataset.
To specify list box items using a lookup field, the dataset to which you link the control must already define a lookup field. . To specify the lookup field for the list box items,

1 Set the DataSource property of the list box to the data source for the dataset containing the lookup field to use.
2 Choose the lookup field to use from the drop-down list for the DataField property.

When you activate a table associated with a lookup control, the control recognizes that its data field is a lookup field, and displays the appropriate values from the lookup.

A secondary data source, data field, and key.
If you have not defined a lookup field for a dataset, you can establish a similar relationship using a secondary data source, a field value to search on in the secondary data source, and a field value to return as a list item. To specify a secondary data source for list box items,

3 Set the DataSource property of the list box to the data source for the control.
4 Choose a field into which to insert looked-up values from the drop-down list for the DataField property. The field you choose cannot be a lookup field.
5 Set the ListSource property of the list box to the data source for the dataset that contain the field whose values you want to look up.

6 Choose a field to use as a lookup key from the drop-down list for the KeyField property. The drop-down list displays fields for the dataset associated with data source you specified in Step 3. The field you choose need not be part of an index, but if it is, lookup performance is even faster.
7 Choose a field whose values to return from the drop-down list for the ListField property. The drop-down list displays fields for the dataset associated with the data source you specified in Step 3.

When you activate a table associated with a lookup control, the control recognizes that its list items are derived from a secondary source, and displays the appropriate values from that source.

To specify the number of items that appear at one time in a TDBLookupListBox control, use the RowCount property. The height of the list box is adjusted to fit this row count exactly.
To specify the number of items that appear in the drop-down list of TDBLookupComboBox, use the DropDownRows property instead.

Note: You can also set up a column in a data grid to act as a lookup combo box. For information on how to do this, see Defining a lookup list column.



James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top