--- src/ui/frmChildTableViewFrame.cpp.orig Wed Oct 29 09:28:32 2003 +++ src/ui/frmChildTableViewFrame.cpp Wed Oct 29 12:35:14 2003 @@ -76,7 +76,11 @@ // Constructor //////////////////////////////////////////////////////////////////////////////// frmChildTableViewFrame::frmChildTableViewFrame(wxMDIParentFrame* frame, - wxString table, wxString alias, pgDatabase *database) + wxString table, wxString alias, pgDatabase *database): + wxMDIChildFrame(frame, -1, alias, wxDefaultPosition, + wxSize(200, 200), wxRESIZE_BORDER|wxSIMPLE_BORDER ) + + { int rowct = 0; m_columnlist = NULL; @@ -101,8 +105,8 @@ int leading; // Create the frame - this->Create(frame, -1, alias, wxDefaultPosition, - wxSize(200, 200), wxRESIZE_BORDER|wxSIMPLE_BORDER ); +// this->Create(frame, -1, alias, wxDefaultPosition, +// wxSize(200, 200), wxRESIZE_BORDER|wxSIMPLE_BORDER ); // Create the table name // wxStaticText *tmpstatic = new wxStaticText(this, -1, @@ -386,16 +390,19 @@ if (event.m_leftDown && !dblClick) { + myList *win = (myList*)event.GetEventObject(); + frmChildTableViewFrame *tmpparent = (frmChildTableViewFrame*)this->GetParent(); wxString tmpstr = tmpparent->m_title + wxT(".") + - this->GetStringSelection(); + win->GetStringSelection(); // start drag operation wxTextDataObject textData(tmpstr); - wxDropSource source(textData, NULL, + // wxDropSource source(textData, NULL, + wxDropSource source(textData, this, wxDROP_ICON(dnd_copy), wxDROP_ICON(dnd_move), wxDROP_ICON(dnd_none)); @@ -501,21 +508,24 @@ void frmChildTableViewFrame::OnSize(wxSizeEvent& event) { // Get the parent Query Builder +/* frmQueryBuilder *tmpparent = (frmQueryBuilder*)this->GetParent(); tmpparent->GetClientWindow()->Refresh(); - wxSize clientsize = this->GetClientSize(); +*/ + wxWindow *win = (wxWindow*) event.GetEventObject(); + wxSize clientsize = win->GetClientSize(); if (clientsize.y < m_minheight) { - SetClientSize(clientsize.x, m_minheight); + win->SetClientSize(clientsize.x, m_minheight); event.Skip(); return; } if (clientsize.x < m_titlewidth) { - SetClientSize(m_titlewidth, clientsize.y); + win->SetClientSize(m_titlewidth, clientsize.y); event.Skip(); return; } --- src/ui/frmQueryBuilder.cpp.orig Wed Oct 29 11:25:45 2003 +++ src/ui/frmQueryBuilder.cpp Wed Oct 29 11:46:06 2003 @@ -505,9 +505,10 @@ void frmQueryBuilder::OnSize(wxSizeEvent& event) { - if (this->GetClientWindow() != NULL) { + wxMDIParentFrame *win = (wxMDIParentFrame*) event.GetEventObject(); + if (win->GetClientWindow() != NULL) { wxLayoutAlgorithm layout; - layout.LayoutMDIFrame(this); + layout.LayoutMDIFrame(win); } }