Jump to content

Recommended Posts

Posted

Hy... 

in a loop - i add Database values to a uniComboBox:

    while not ZQuery1.Eof do
    begin
      UniComboBox1.Items.Append(ZQuery1.FieldByName('customer_name').asstring);
      ZQuery1.Next;
    end;

Can i save the "unique database Integer"  to the item also ? .. 

i want to read the unique Integer AND the UniComboBox1.Text in procedure TuniForm.UniComboBox1Change(Sender: TObject);

 

ThanX

 

 

 

Posted

Hi,

For example...

UniComboBox1.Items.AddObject('Text1', TObject(1));

procedure TMainForm.UniComboBox1Change(Sender: TObject);
begin
  ShowMessage(IntToStr(Integer(UniComboBox1.Items.Objects[UniComboBox1.ItemIndex])));
end;

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...