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

DBGrid column titles 1

Status
Not open for further replies.

PaidtheUmpire

Programmer
Jan 4, 2004
105
AU
Is their a way to do any of the following:

1) Change the titles in a DBGrid

2) Make a button move the user to another PageTab.

Thanks
 
Your first question:

This is the code:
Code:
DBGrid1.Columns.Items[0].Title.Caption := 'New Title';

The Items[#] sets which column you want to change.

For your second question:

It depends on wether you are using a PageControl or a TabControl.

For a PageControl it would be:
Code:
PageControl1.ActivePage := TTabSheet;

For a TabControl it would be:
Code:
TabControl1.TabIndex := {tab number here, first tab is 0};


[bobafett] BobbaFet [bobafett]

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com Great Delphi Websites faq102-5352
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top