Ja miałem podobny problem bo chciałem wyświetlić 2 kolumny i rozwiązałem to tak :
do każdej nazwy np. "_pozostali" na końcu dodawałem numer czyli : =9999
Czyli treść wyglądała tak _pozostali=9999
a dalej to już tylko odpowiednie wyświetlenie danych i wyciąganie informacji np. :
Procedure TForm1.RysujCombo(Kombo:TCombobox; szerokosc:integer; separator:string;Reszta:byte; Rect:Trect; Index: Integer);
var
tst,tst1:string;
Ltst:byte;
Begin
with Kombo.Canvas do
begin
FillRect(Rect);
pen.Color:=clBtnFace;//rgb(255,0,0);
//Brush.Style := bsSolid; // styl - jednolity
Rectangle(Rect.Left + szerokosc-6, Rect.Top -2, Rect.Left + szerokosc-4, Rect.Bottom + 2);
Brush.Style := bsClear; // tło na przeźroczyste
tst:=Kombo.Items.Strings[index];
tst1:=tst;
ltst:=pos(SEPARATOR,tst);
delete(tst,ltst,(length(tst)-ltst)+1);
delete(tst1,1,length(tst)+1);
delete(tst1,length(tst1)-RESZTA+1,reszta);
TextOut(Rect.Left+4 , Rect.Top + 2, tst1 ); // pisz tekst
TextOut(Rect.Left + szerokosc, Rect.Top + 2, tst ); // pisz tekst
end;
End;
procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
begin
RysujCombo(ComboBox8,80,'=',0,RECT,INDEX);
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
var
tst,tst1:string;
begin
tst:=combobox1.Text;
tst1:=tst;
delete(tst,1,pos('=',tst)); //numer za =
delete(tst1,pos('=',tst1),255);//tekst
end;