wxHtmlWindow's flags is now wxHSCROLL | wxVSCROLL

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2000-01-14 21:40:41 +00:00
parent e7ee65ed51
commit f3bcfd9bcd

View File

@@ -41,7 +41,7 @@ WX_DEFINE_OBJARRAY(HtmlHistoryArray)
wxHtmlWindow::wxHtmlWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, wxHtmlWindow::wxHtmlWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
long style, const wxString& name) : wxScrolledWindow(parent, id, pos, size, wxVSCROLL, name) long style, const wxString& name) : wxScrolledWindow(parent, id, pos, size, wxVSCROLL | wxHSCROLL, name)
{ {
m_tmpMouseMoved = FALSE; m_tmpMouseMoved = FALSE;
m_tmpLastLink = NULL; m_tmpLastLink = NULL;
@@ -155,7 +155,7 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
if (f == NULL) { if (f == NULL) {
wxString err; wxString err;
err.Printf(_("The browser is unable to open requested location :\n\n%s"), WXSTRINGCAST location); err.Printf(_("Unable to open requested location :\n\n%s"), WXSTRINGCAST location);
m_tmpCanDrawLocks--; m_tmpCanDrawLocks--;
Refresh(); Refresh();
wxMessageBox(err, "Error"); wxMessageBox(err, "Error");
@@ -271,10 +271,11 @@ void wxHtmlWindow::CreateLayout()
#endif #endif
GetClientSize(&ClientWidth, &ClientHeight); GetClientSize(&ClientWidth, &ClientHeight);
m_Cell -> Layout(ClientWidth); m_Cell -> Layout(ClientWidth);
if (ClientHeight < m_Cell -> GetHeight()) { if (ClientHeight < m_Cell -> GetHeight() + GetCharHeight()) {
SetScrollbars(wxHTML_SCROLL_STEP, wxHTML_SCROLL_STEP, SetScrollbars(
wxHTML_SCROLL_STEP, wxHTML_SCROLL_STEP,
m_Cell -> GetWidth() / wxHTML_SCROLL_STEP, m_Cell -> GetWidth() / wxHTML_SCROLL_STEP,
m_Cell -> GetHeight() / wxHTML_SCROLL_STEP (m_Cell -> GetHeight() + GetCharHeight()) / wxHTML_SCROLL_STEP
/*cheat: top-level frag is always container*/); /*cheat: top-level frag is always container*/);
} }
else { /* we fit into window, no need for scrollbars */ else { /* we fit into window, no need for scrollbars */