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!

Accessing Labels on form from Component 1

Status
Not open for further replies.

Mannga

Programmer
Jun 21, 2002
85
GB
I have a windows form called "Main" with a label call "lProgress"
I also have a Component called "Export"

Inside "Export" I have a function "PopulateData" here is what I would like to do.

On button click in main I call the PopulateData function.

public void PopulateData()
{
int uBound = Sectors.GetUpperBound(0);
int j = 0;
while( j <= uBound )
{
//Somehow Main.lProgress.Text = j;
}
}

How can I access this label in these circumstances?

Thanks,
Gavin
 
Why don't you pass the label as a parameter to PopulateData()?
 
That works 100%, thanks for showing me a really important thing to know....

Cheers,
Gavin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top