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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make a trable like this one?

Status
Not open for further replies.

SLider3

Programmer
Jun 17, 2003
56
PT
How can I make a table like this one?
table.jpg


I want to put one table like the one is above in my BCB program but I don´t know what component use. I tryed the components StringGrid and ValueListEditor but I wasn't able to do what i want.
Can you help me????
 
You should be able to do this with the StringGrid component, exactly what about it didn't work?
 
well, my problems with StringGrid are:
How can i change the Column Titles???
Is there properties like doAutoColResize and doKeyColFixed?? (because ValueListEditor has)
 
How can i change the Column Titles??? Set the number of fixed row to 1 then write to the cells in row 0.
Code:
int BundleRow = 0;
BundleStringGrid->Cells[1][BundleRow] = "Bundle #";
BundleStringGrid->Cells[2][BundleRow] = "# of Sheets";
BundleStringGrid->Cells[3][BundleRow] = "Length CM";
BundleStringGrid->Cells[4][BundleRow] = "Width CM";
BundleStringGrid->Cells[5][BundleRow] = "Sq. Meters";
BundleStringGrid->Cells[6][BundleRow] = "Length In";
BundleStringGrid->Cells[7][BundleRow] = "Width In";
BundleStringGrid->Cells[8][BundleRow] = "Sq. Feet ";
BundleRow++;
.
.
.

Is there properties like doAutoColResize and doKeyColFixed? StringGrid has several properties. Since I'm not familiar with ValueListEditor I can't say which ones are going to do the same thing.

James P. Cottingham

There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
 
StringGrid doesn't have doAutoColResize and doKeyColFixed, and ValueListEditor isn't going to do exactly what you want either since it is designed to edit only key/value pairs.

I have used Michael Dürig's free extended grid component which gives a lot more flexibility than the standard StringGrid component, but don't know if it will allow you to de exactly what you want either. It does give you much more powerful cell editing capabilites with edit masks, drop-downs (and more) for individual cells as well as many other features. You may want to check it out:


Also, you might get a better response if you ask in the C++ builder forum rather than this forum.

Good Luck.
 
@2ffat
doAutoColResize -> Automaticaly resize the columns to fit the table width (it means that we never need a horizontal scrollbar.
doKeyColFixed -> fixes the column sizes (the user cant resize them).

Can you help me now?
 
@itsgsd
You have posted while i was writing my post befoure.

Thanks, I'll try this component. Do you know where i can find more useful components like this one?

 
Look in the FAQ in the Builder forum for some good Builder sites to visit.


James P. Cottingham

There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top