diff --git a/DearPyGui/src/ui/AppItems/mvBasicWidgets.cpp b/DearPyGui/src/ui/AppItems/mvBasicWidgets.cpp index 436898024..90f98b3f3 100644 --- a/DearPyGui/src/ui/AppItems/mvBasicWidgets.cpp +++ b/DearPyGui/src/ui/AppItems/mvBasicWidgets.cpp @@ -1150,6 +1150,25 @@ DearPyGui::set_configuration(PyObject* inDict, mvListboxConfig& outConfig, mvApp } index++; } + + if (!outConfig.value->empty()) + { + if (!outConfig.names.empty()) + { + bool oldValueFound = false; + for (int i = 0; i < outConfig.names.size(); i++) + { + if (outConfig.names[i] == *outConfig.value) + { + oldValueFound = true; + break; + } + } + + if(!oldValueFound) + *outConfig.value = outConfig.names[0]; + } + } } if(outConfig.value->empty())