When using an external scrollbar ensure that the built-in one is set

at minimal values so it won't be displayed.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2004-11-10 19:58:49 +00:00
parent c34924f7bc
commit ccfc3219db
8 changed files with 86 additions and 10 deletions

View File

@ -2832,11 +2832,11 @@ public:
// Set the vertical scrollbar to use instead of the ont that's built-in.
void SetVScrollBar(wxScrollBar* bar) { m_vScrollBar = bar; }
void SetVScrollBar(wxScrollBar* bar);
// Set the horizontal scrollbar to use instead of the ont that's built-in.
void SetHScrollBar(wxScrollBar* bar) { m_hScrollBar = bar; }
void SetHScrollBar(wxScrollBar* bar);
// Can be used to prevent the EVT_CHAR handler from adding the char
bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; }

View File

@ -190,7 +190,26 @@ long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) {
return m_swx->WndProc(msg, wp, lp);
}
//----------------------------------------------------------------------
// Set the vertical scrollbar to use instead of the ont that's built-in.
void wxStyledTextCtrl::SetVScrollBar(wxScrollBar* bar) {
m_vScrollBar = bar;
if (bar != NULL) {
// ensure that the built-in scrollbar is not visible
SetScrollbar(wxVERTICAL, 0, 0, 0);
}
}
// Set the horizontal scrollbar to use instead of the ont that's built-in.
void wxStyledTextCtrl::SetHScrollBar(wxScrollBar* bar) {
m_hScrollBar = bar;
if (bar != NULL) {
// ensure that the built-in scrollbar is not visible
SetScrollbar(wxHORIZONTAL, 0, 0, 0);
}
}
//----------------------------------------------------------------------
// BEGIN generated section. The following code is automatically generated
@ -2590,7 +2609,7 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename)
#if wxUSE_UNICODE
wxMemoryBuffer buffer(len+1);
success = (file.Read(buffer.GetData(), len) == len);
if (success) {
if (success) {
((char*)buffer.GetData())[len] = 0;
contents = wxString(buffer, *wxConvCurrent, len);
}

View File

@ -190,7 +190,26 @@ long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) {
return m_swx->WndProc(msg, wp, lp);
}
//----------------------------------------------------------------------
// Set the vertical scrollbar to use instead of the ont that's built-in.
void wxStyledTextCtrl::SetVScrollBar(wxScrollBar* bar) {
m_vScrollBar = bar;
if (bar != NULL) {
// ensure that the built-in scrollbar is not visible
SetScrollbar(wxVERTICAL, 0, 0, 0);
}
}
// Set the horizontal scrollbar to use instead of the ont that's built-in.
void wxStyledTextCtrl::SetHScrollBar(wxScrollBar* bar) {
m_hScrollBar = bar;
if (bar != NULL) {
// ensure that the built-in scrollbar is not visible
SetScrollbar(wxHORIZONTAL, 0, 0, 0);
}
}
//----------------------------------------------------------------------
// BEGIN generated section. The following code is automatically generated

View File

@ -186,11 +186,11 @@ public:
// Set the vertical scrollbar to use instead of the ont that's built-in.
void SetVScrollBar(wxScrollBar* bar) { m_vScrollBar = bar; }
void SetVScrollBar(wxScrollBar* bar);
// Set the horizontal scrollbar to use instead of the ont that's built-in.
void SetHScrollBar(wxScrollBar* bar) { m_hScrollBar = bar; }
void SetHScrollBar(wxScrollBar* bar);
// Can be used to prevent the EVT_CHAR handler from adding the char
bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; }

View File

@ -2832,11 +2832,11 @@ public:
// Set the vertical scrollbar to use instead of the ont that's built-in.
void SetVScrollBar(wxScrollBar* bar) { m_vScrollBar = bar; }
void SetVScrollBar(wxScrollBar* bar);
// Set the horizontal scrollbar to use instead of the ont that's built-in.
void SetHScrollBar(wxScrollBar* bar) { m_hScrollBar = bar; }
void SetHScrollBar(wxScrollBar* bar);
// Can be used to prevent the EVT_CHAR handler from adding the char
bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; }

View File

@ -190,7 +190,26 @@ long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) {
return m_swx->WndProc(msg, wp, lp);
}
//----------------------------------------------------------------------
// Set the vertical scrollbar to use instead of the ont that's built-in.
void wxStyledTextCtrl::SetVScrollBar(wxScrollBar* bar) {
m_vScrollBar = bar;
if (bar != NULL) {
// ensure that the built-in scrollbar is not visible
SetScrollbar(wxVERTICAL, 0, 0, 0);
}
}
// Set the horizontal scrollbar to use instead of the ont that's built-in.
void wxStyledTextCtrl::SetHScrollBar(wxScrollBar* bar) {
m_hScrollBar = bar;
if (bar != NULL) {
// ensure that the built-in scrollbar is not visible
SetScrollbar(wxHORIZONTAL, 0, 0, 0);
}
}
//----------------------------------------------------------------------
// BEGIN generated section. The following code is automatically generated
@ -2590,7 +2609,7 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename)
#if wxUSE_UNICODE
wxMemoryBuffer buffer(len+1);
success = (file.Read(buffer.GetData(), len) == len);
if (success) {
if (success) {
((char*)buffer.GetData())[len] = 0;
contents = wxString(buffer, *wxConvCurrent, len);
}

View File

@ -190,7 +190,26 @@ long wxStyledTextCtrl::SendMsg(int msg, long wp, long lp) {
return m_swx->WndProc(msg, wp, lp);
}
//----------------------------------------------------------------------
// Set the vertical scrollbar to use instead of the ont that's built-in.
void wxStyledTextCtrl::SetVScrollBar(wxScrollBar* bar) {
m_vScrollBar = bar;
if (bar != NULL) {
// ensure that the built-in scrollbar is not visible
SetScrollbar(wxVERTICAL, 0, 0, 0);
}
}
// Set the horizontal scrollbar to use instead of the ont that's built-in.
void wxStyledTextCtrl::SetHScrollBar(wxScrollBar* bar) {
m_hScrollBar = bar;
if (bar != NULL) {
// ensure that the built-in scrollbar is not visible
SetScrollbar(wxHORIZONTAL, 0, 0, 0);
}
}
//----------------------------------------------------------------------
// BEGIN generated section. The following code is automatically generated

View File

@ -186,11 +186,11 @@ public:
// Set the vertical scrollbar to use instead of the ont that's built-in.
void SetVScrollBar(wxScrollBar* bar) { m_vScrollBar = bar; }
void SetVScrollBar(wxScrollBar* bar);
// Set the horizontal scrollbar to use instead of the ont that's built-in.
void SetHScrollBar(wxScrollBar* bar) { m_hScrollBar = bar; }
void SetHScrollBar(wxScrollBar* bar);
// Can be used to prevent the EVT_CHAR handler from adding the char
bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; }