Board index » delphi » Help with Array and INI file
MerLiN
![]() Delphi Developer |
Sun, 12 Dec 2004 01:43:47 GMT
Help with Array and INI file
Can anyone tell me how to fix a bug in my program?
My program has around 12 comboboxes with 99 items in each. I'm using a procedure to get the values since the items for all combos are the same. I want to create an ini file to store the items selected so the user doesn't have to reselect the items next time the program is run. Below is the code I am using (sorry about the length of this post) When I run the program it shows the item that was saved but due to the procedure being used it acts as if the combo hasnt got a value in it? Any ideas? I removed some of the values in this post to make it smaller. procedure TForm1.AnyComboBoxChange(Sender: TObject); procedure TForm1.ComboBox11Change(Sender: TObject); procedure TForm1.FormCreate(Sender: TObject); begin INI := TIniFile.Create('RCalc.dat'); ComboBox2.ItemIndex := INI.ReadInteger('ComboBox2','Item', 0); INI.Free; end; |