/** * @brief Makes the control enabled or disabled. * @param[in] doEnable true to enable the control, or false to disable the control. */ void BeListViewAdapter::Enable(bool doEnable) { BListView* listView = getListView(); int32 count = listView->CountItems(); int32 index; for (index = 0; index < count; index++) { BListItem* listItem = listView->ItemAt(index); listItem->SetEnabled(doEnable); } listView->LockLooper(); listView->Invalidate(); listView->UnlockLooper(); isEnabled = doEnable; }