Is this possible in a string grid.
Having a timetable, Row and Collums (Day, Time) And the user can enter their name onto a field (box for their desired Day/Time box ) and then save this ?
I'm not completely clear on what you want to do... but I think so.
this is what i have so far,
I have a record in the other forms, but However, when i run this, i cannot write anything on the box.Code:procedure TForm3.FormCreate(Sender: TObject); begin with StringGrid1 do begin ColCount:= 10 ; RowCount:= 7; Colwidths[0]:=100; ColWidths[1]:=300; ColWidths[2]:=400; cells [0, 0]:= 'Day'; cells [1,0]:= '9:00 AM'; cells [2,0]:= '9:30 AM'; cells [3,0]:= '10:00 AM'; cells [4,0]:= '10:30 AM'; cells [5,0]:= '11:00 AM'; cells [6,0]:= '11:30 AM'; cells [7,0]:= '12:00 PM'; cells [8,0]:= '12:30 PM'; cells [19,0]:= '1:00 AM'; cells [10,0]:= '1:30 AM'; cells [0,1] := 'Monday'; cells [0,2] := 'Tuseday'; cells [0,3] := 'Wednseday'; cells [0,4] := 'Thursday'; cells [0,5] := 'Friday'; cells [0,6] := 'Saturday'; cells [0,7] := 'Sunday'; end; end; end.
How can i make it so i can write onto the field?
Thanks.
Last edited by WingedPanther; 12-19-2009 at 05:43 AM. Reason: add code tags (the # button)
Can you be more precise: what do you want to write from where to where?
I want the user to be able to enter their Firstname onto a field on the StringGrid,
EG, i want all the cells to be able to be written to.
So, [2,3] can have the value of 'Thomas'.
And then this will be saved, and can be seeked on a different form which will display the timetable, and all the people who have entered their names onto a field.
I have fixed it,
i missed out the
stringGrid1.Options := StringGrid1.Options + [goEditing];
Now, how do i Save all of the fields...
I have entered information on the fields, how do i save them onto the file?
You'll have to go through the entire grid, like an array, and write them to file.
can you expand on that? I am abit of a newb, therefor it would be useful if you could write some example code.
Thanks
Are you having problems with accessing the data (using nested for loops) or writing to file? What does your code look like right now?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks