Recent

Author Topic: Two Froms Question  (Read 2440 times)

greertr

  • Full Member
  • ***
  • Posts: 113
    • Virtual Pilot Dashboard
Two Froms Question
« on: June 09, 2016, 01:56:43 pm »
I have a string grid on one form and want to have summary stats displayed on a second form.

Is there a tutorial that will show how to to have the scond form read data from the string grid on the other form, and e.g, sum up a column of numbers and display the total on the sceond form?

I guess the second form would need to have the first form listed in its uses clause, but i'mnot sure how to read the data from the stringgrid on the first form and bring it over to the second.

thx

balazsszekely

  • Guest
Re: Two Froms Question
« Reply #1 on: June 09, 2016, 02:07:08 pm »
Quote
@greertr
but i'mnot sure how to read the data from the stringgrid on the first form and bring it over to the second.
Like this:
Code: Pascal  [Select][+][-]
  1. uses unit1;
  2.  
  3. procedure TForm2.Button1Click(Sender: TObject);
  4. begin
  5.   ShowMessage(Form1.StringGrid1.Cells[1, 1]);
  6. end;

greertr

  • Full Member
  • ***
  • Posts: 113
    • Virtual Pilot Dashboard
Re: Two Froms Question
« Reply #2 on: June 09, 2016, 02:18:29 pm »
thx that will help me get started

 

TinyPortal © 2005-2018