GUI display problems fixed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker 1999-11-07 16:44:45 +00:00
parent 81c67e27fd
commit a968c19a82

View File

@ -168,12 +168,18 @@ bool DatabaseDemoApp::OnInit()
return NULL; return NULL;
} }
params.ODBCSource[0] = 0;
params.UserName[0] = 0;
params.Password[0] = 0;
params.DirPath[0] = 0;
FILE *paramFile; FILE *paramFile;
if ((paramFile = fopen(paramFilename, "r")) == NULL) if ((paramFile = fopen(paramFilename, "r")) == NULL)
{ {
wxString tStr; wxString tStr;
tStr.Printf("Unable to open the parameter file '%s' for reading.\n\nYou must specify the data source, user name, and\npassword that will be used and save those settings.",paramFilename); tStr.Printf("Unable to open the parameter file '%s' for reading.\n\nYou must specify the data source, user name, and\npassword that will be used and save those settings.",paramFilename);
wxMessageBox(tStr,"File I/O Error...",wxOK | wxICON_EXCLAMATION); wxMessageBox(tStr,"File I/O Error...",wxOK | wxICON_EXCLAMATION);
DemoFrame->BuildParameterDialog(NULL); DemoFrame->BuildParameterDialog(NULL);
if ((paramFile = fopen(paramFilename, "r")) == NULL) if ((paramFile = fopen(paramFilename, "r")) == NULL)
return FALSE; return FALSE;
@ -1429,7 +1435,8 @@ bool CparameterDlg::PutData()
FillDataSourceList(); FillDataSourceList();
// Fill in the fields from the params object // Fill in the fields from the params object
pParamODBCSourceList->SetStringSelection(wxGetApp().params.ODBCSource); if (wxGetApp().params.ODBCSource && wxStrlen(wxGetApp().params.ODBCSource))
pParamODBCSourceList->SetStringSelection(wxGetApp().params.ODBCSource);
pParamUserNameTxt->SetValue(wxGetApp().params.UserName); pParamUserNameTxt->SetValue(wxGetApp().params.UserName);
pParamPasswordTxt->SetValue(wxGetApp().params.Password); pParamPasswordTxt->SetValue(wxGetApp().params.Password);
pParamDirPathTxt->SetValue(wxGetApp().params.DirPath); pParamDirPathTxt->SetValue(wxGetApp().params.DirPath);