Código
delphi
combo.items.AddObject(Query1.FieldByName('DESCRICAO').AsString,
Pointer(Query1.FieldByName('ID').AsInteger));
vb
combo.AddItem Recordset1!DESCRICAO
combo.ItemData(combo.NewIndex) = Recordset1!ID
==============================================
ler dados
delphi
if combo.ItemIndex <> -1 then
Begin
Edit.Text := IntToStr(integer(combo.Items.Objects[combo.ItemIndex]));
End;
vb
----
if combo.ListIndex <> -1 then
EditText = combo.ItemData(combo.ListIndex)
end if
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009