|
리스트 님이 쓰신 글 :
: void __fastcall TForm8::ListBox1Click(TObject *Sender)
: {
: UnicodeString strFind = ListBox1->Items->Strings[ListBox1->ItemIndex];
:
: ListBox2->AddItem(strFind,NULL);
: }
: //---------------------------------------------------------------------------
:
:
: 방금 클릭한게 2번인덱스값이고 또같은 위치를 클릭할경우는 무시하고싶은데요
:
: 어떻게 코딩하면 될지 감이 안오네요 고수님들의 조언부탁드립니다
대충 전역변수 하나 만들면 끝...
if(i_old_index != ListBox1->ItemIndex)
{
UnicodeString strFind = ListBox1->Items->Strings[ListBox1->ItemIndex];
ListBox2->AddItem(strFind,NULL);
i_old_index = ListBox1->ItemIndex;
}
|