Different processing methods for displaying text and value of combobox in Delphi

From , 5 Years ago, written in Delphi (Object Pascal), viewed 105 times.
URL https://pastebin.vip/view/3e9f7c16
  1. procedure   TForm1.Button1Click(Sender:   TObject);
  2. begin
  3.     ComboBox1.AddItem(rs.Name,Tobject(rs.id));   //添加对象
  4. end;
  5.  
  6. procedure   TForm1.Button2Click(Sender:   TObject);
  7. var
  8.     id   :   integer;
  9. begin
  10.     id   :=   integer(ComboBox1.Items.Objects[0]);     //访问对象
  11. end;
  12. //delphi/3881

Reply to "Different processing methods for displaying text and value of combobox in Delphi"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website