Board index » cppbuilder » repost: TCheckListBox->Keep focus, of the selected item..
Oren Halvani
![]() CBuilder Developer |
repost: TCheckListBox->Keep focus, of the selected item..2004-10-07 06:12:38 AM cppbuilder66 once again dear builders, how can i keep the focus if i select an item from a CheckListBox and than leave the control..? it should be something like this... /*****************************************************/ // move item down... void __fastcall TfrmMainUnit::cmdMove_DownClick(TObject *Sender) { if(CheckListBox1->ItemIndex <= CheckListBox1->Items->Count) { CheckListBox1->Items->Move(CheckListBox1->ItemIndex, CheckListBox1->ItemIndex + 1); } int itemindex = CheckListBox1->ItemIndex; CheckListBox1->ItemIndex = itemindex; CheckListBox1->SetFocus(); } // move item up... void __fastcall TfrmMainUnit::cmdMove_UpClick(TObject *Sender) { if(CheckListBox1->ItemIndex>0) { CheckListBox1->Items->Move(CheckListBox1->ItemIndex, CheckListBox1->ItemIndex - 1); } int itemindex = CheckListBox1->ItemIndex; CheckListBox1->ItemIndex = itemindex; CheckListBox1->SetFocus(); } /*****************************************************/ Oren |