hola a todos! estoy usando archivos ini y me surgio un problema con readsectionvalue. el problema es que con esta lectura me aparece la seccion seguida del valor ( section=value) y yo quiero que aparezca el valor solo. como puedo hacer esto?? les dejo mi codigo de prueba.
Código:
var ini: tinifile;
procedure TForm1.Button1Click(Sender: TObject);
begin
ini:= tinifile.Create('C:\Documents and Settings\usuario\Escritorio\prueba.ini');
ini.ReadSections(combobox1.Items);
ComboBox1.ItemIndex := 0;
end;
procedure TForm1.ComboBox1Click(Sender: TObject);
var str: string;
begin
if (Sender is TcomboBox) then begin
Str := ComboBox1.Items[ComboBox1.ItemIndex];
ini.ReadSection(str, ComboBox2.Items);
ini.ReadSectionValues(str, combobox3.items);
end;
ComboBox2.ItemIndex := 0;
ComboBox3.ItemIndex := ComboBox2.ItemIndex;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if (combobox1.text<>'') and (combobox2.text<>'') and (combobox3.text<>'') then
ini.Writestring(combobox1.Text,combobox2.Text,combobox3.Text);
end;