ComboBox - funcoes para gravar lista |
Top Previous Next |
|
Procedure GravaItemNaCombo(Combo:TCustomComboBox; Item:String); begin If (Combo.Items.IndexOf( Item )=-1) and (Item <> '') then Combo.Items.Add( Item ); end;
Procedure CarregaComboBox(Combo:TCustomComboBox; Arquivo:String); begin If FileExists( ExtractFilePath(Application.ExeName) + Arquivo + '.cmb') then Combo.Items.LoadFromFile( ExtractFilePath(Application.ExeName) + Arquivo + '.cmb'); end;
Procedure GravaComboBox(Combo:TCustomComboBox; Arquivo:String); begin Combo.Items.SaveToFile( ExtractFilePath(Application.ExeName) + Arquivo + '.cmb'); end; |