The problem was NOT solved by manually putting the foreground color of the text box in the "Editor". I tried this code:
set(hObject,'ForegroundColor','black');
after the CreateFcn line:
function edit24_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'ForegroundColor','black');
set(textBoxHandles,'groundColor',originalBGColor)
end