|
다음과 같이 해보십시오.
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
bool bExist;
TStringList *strlist = new TStringList();
for(int i=0;i<ComboBox1->Items->Count;i++){
bExist = false;
for(int j=0;j<strlist->Count;j++){
if(CompareText(ComboBox1->Items->Strings[i],strlist->Strings[j])==0) bExist = true;
}
if(bExist==false) strlist->Add(ComboBox1->Items->Strings[i]);
}
ComboBox1->Clear();
ComboBox1->Items->AddStrings(strlist);
delete strlist;
}
//---------------------------------------------------------------------------
민인학 님이 쓰신 글 :
: 어떻게 해야하죠?
: 예를 들어
: a
: a
: a
: b
: b
: b
: c
: c
: c
:
:
:
: 이렇게 콤보박스에 들어 있을때..
: a
: b
: c
: 만 보여주고 싶습니다..
:
: 꼭좀 부탁드립니다.
|