From fd128b0c3ab84380d782e45bfa98f181a848df27 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 26 Jul 1999 14:28:25 +0000 Subject: [PATCH] Added more docs for the new events, derived from wxNotifyEvents. Added docs for wxScrollWinEvent and corrected docs referring to wxScrollEvent etc. wxTreeCtrl's and wxListCtrl's ::EditLabel() returns void. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/category.tex | 3 ++ docs/latex/wx/listctrl.tex | 19 +++++------ docs/latex/wx/listevt.tex | 4 +-- docs/latex/wx/notebook.tex | 5 ++- docs/latex/wx/noteevt.tex | 2 +- docs/latex/wx/scrlwevt.tex | 68 ++++++++++++++++++++++++++++++++++++++ docs/latex/wx/scrolevt.tex | 8 +++-- docs/latex/wx/tevent.tex | 3 +- docs/latex/wx/treectrl.tex | 23 ++++++------- docs/latex/wx/treeevt.tex | 14 +++----- src/gtk/dcclient.cpp | 6 ++-- src/gtk1/dcclient.cpp | 6 ++-- 12 files changed, 114 insertions(+), 47 deletions(-) create mode 100644 docs/latex/wx/scrlwevt.tex diff --git a/docs/latex/wx/category.tex b/docs/latex/wx/category.tex index 4a35341b60..c6a5233d59 100644 --- a/docs/latex/wx/category.tex +++ b/docs/latex/wx/category.tex @@ -178,9 +178,12 @@ An event object contains information about a specific event. Event handlers \twocolitem{\helpref{wxMouseEvent}{wxmouseevent}}{A mouse event} \twocolitem{\helpref{wxMoveEvent}{wxmoveevent}}{A move event} \twocolitem{\helpref{wxNotebookEvent}{wxnotebookevent}}{A notebook control event} +\twocolitem{\helpref{wxNotifyEvent}{wxnotifyevent}}{A notification event, which can be vetoed} \twocolitem{\helpref{wxPaintEvent}{wxpaintevent}}{A paint event} \twocolitem{\helpref{wxProcessEvent}{wxprocessevent}}{A process ending event} \twocolitem{\helpref{wxQueryLayoutInfoEvent}{wxquerylayoutinfoevent}}{Used to query layout information} +\twocolitem{\helpref{wxScrollEvent}{wxscrollevent}}{A scroll event from sliders, stand-alone scrollbars and spin buttons} +\twocolitem{\helpref{wxScrollWinEvent}{wxscrollwinevent}}{A scroll event from scrolled windows} \twocolitem{\helpref{wxSizeEvent}{wxsizeevent}}{A size event} \twocolitem{\helpref{wxSocketEvent}{wxsocketevent}}{A socket event} \twocolitem{\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}}{A system colour change event} diff --git a/docs/latex/wx/listctrl.tex b/docs/latex/wx/listctrl.tex index 22661e87d1..afa9e5e5eb 100644 --- a/docs/latex/wx/listctrl.tex +++ b/docs/latex/wx/listctrl.tex @@ -48,8 +48,8 @@ functions that take a \helpref{wxListEvent}{wxlistevent} argument. \begin{twocollist}\itemsep=0pt \twocolitem{{\bf EVT\_LIST\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.} \twocolitem{{\bf EVT\_LIST\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.} -\twocolitem{{\bf EVT\_LIST\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label.} -\twocolitem{{\bf EVT\_LIST\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label.} +\twocolitem{{\bf EVT\_LIST\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} +\twocolitem{{\bf EVT\_LIST\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_LIST\_DELETE\_ITEM(id, func)}}{Delete an item.} \twocolitem{{\bf EVT\_LIST\_DELETE\_ALL\_ITEMS(id, func)}}{Delete all items.} \twocolitem{{\bf EVT\_LIST\_GET\_INFO(id, func)}}{Request information from the application, usually the item text.} @@ -149,16 +149,15 @@ Deletes a column. \membersection{wxListCtrl::EditLabel}\label{wxlistctrledit} -\func{wxTextCtrl *}{Edit}{\param{long }{item}} +\func{void}{EditLabel}{\param{long }{item}} -Starts editing the label of the given item, returning the text control that -the tree control uses for editing. This function generates a -EVT\_LIST\_BEGIN\_LABEL\_EDIT event and if the event handler returns FALSE, label -editing will not start and NULL will be returned - be ready to handle this -case. +Starts editing the label of the given item. This function generates a +EVT\_LIST\_BEGIN\_LABEL\_EDIT event which can be vetoed so that no +text control will appear for in-place editing. -The text control returned should not be deleted by the application and is not -valid any longer after the EVT\_LIST\_END\_LABEL\_EDIT event is received. +If the user changed the label (i.e. s/he does not press ESC or leave +the text control without changes, a EVT\_LIST\_END\_LABEL\_EDIT event +will be sent which can be vetoed as well. \membersection{wxListCtrl::EnsureVisible}\label{wxlistctrlensurevisible} diff --git a/docs/latex/wx/listevt.tex b/docs/latex/wx/listevt.tex index 3de64d27c7..6dbb70d0dd 100644 --- a/docs/latex/wx/listevt.tex +++ b/docs/latex/wx/listevt.tex @@ -22,8 +22,8 @@ functions that take a wxListEvent argument. \begin{twocollist}\itemsep=0pt \twocolitem{{\bf EVT\_LIST\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.} \twocolitem{{\bf EVT\_LIST\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.} -\twocolitem{{\bf EVT\_LIST\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label.} -\twocolitem{{\bf EVT\_LIST\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label.} +\twocolitem{{\bf EVT\_LIST\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} +\twocolitem{{\bf EVT\_LIST\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_LIST\_DELETE\_ITEM(id, func)}}{Delete an item.} \twocolitem{{\bf EVT\_LIST\_DELETE\_ALL\_ITEMS(id, func)}}{Delete all items.} \twocolitem{{\bf EVT\_LIST\_GET\_INFO(id, func)}}{Request information from the application, usually the item text.} diff --git a/docs/latex/wx/notebook.tex b/docs/latex/wx/notebook.tex index e70c497000..1b810993e0 100644 --- a/docs/latex/wx/notebook.tex +++ b/docs/latex/wx/notebook.tex @@ -26,10 +26,9 @@ functions that take a \helpref{wxNotebookEvent}{wxnotebookevent} argument. \twocolwidtha{7cm} \begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_NOTEBOOK\_PAGE\_CHANGED(id, func)}}{The page selection was changed. Processes a -wxEVT\_COMMAND\_NOTEBOOK\_PAGE\_CHANGED event.} +\twocolitem{{\bf EVT\_NOTEBOOK\_PAGE\_CHANGED(id, func)}}{The page selection was changed.} \twocolitem{{\bf EVT\_NOTEBOOK\_PAGE\_CHANGING(id, func)}}{The page selection is about to be changed. -Processes a wxEVT\_COMMAND\_NOTEBOOK\_PAGE\_CHANGING event.} +This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \end{twocollist}% \wxheading{See also} diff --git a/docs/latex/wx/noteevt.tex b/docs/latex/wx/noteevt.tex index 3f557d1096..4fcc6816d6 100644 --- a/docs/latex/wx/noteevt.tex +++ b/docs/latex/wx/noteevt.tex @@ -38,7 +38,7 @@ functions that take a wxNotebookEvent argument. \twocolitem{{\bf EVT\_NOTEBOOK\_PAGE\_CHANGED(id, func)}}{The page selection was changed. Processes a wxEVT\_COMMAND\_NOTEBOOK\_PAGE\_CHANGED event.} \twocolitem{{\bf EVT\_NOTEBOOK\_PAGE\_CHANGING(id, func)}}{The page selection is about to be changed. -Processes a wxEVT\_COMMAND\_NOTEBOOK\_PAGE\_CHANGING event.} +Processes a wxEVT\_COMMAND\_NOTEBOOK\_PAGE\_CHANGING event. This event can be \helpref{vetoed}{wxnotifyeventveto}.} \end{twocollist}% \wxheading{See also} diff --git a/docs/latex/wx/scrlwevt.tex b/docs/latex/wx/scrlwevt.tex new file mode 100644 index 0000000000..f77594c843 --- /dev/null +++ b/docs/latex/wx/scrlwevt.tex @@ -0,0 +1,68 @@ +\section{\class{wxScrollWinEvent}}\label{wxscrollwinevent} + +A scroll event holds information about events sent from scrolling windows. + +\wxheading{Derived from} + +\helpref{wxEvent}{wxevent}\\ +\helpref{wxObject}{wxobject} + +\wxheading{Include files} + + + +\wxheading{Event table macros} + +To process a scroll event, use these event handler macros to direct input to member +functions that take a wxScrollEvent argument. You can use EVT\_COMMAND\_SCROLLWIN... macros +with window IDs for when intercepting scroll events from controls, or EVT\_SCROLLWIN... macros +without window IDs for intercepting scroll events from the receiving window. + +\twocolwidtha{7cm} +\begin{twocollist}\itemsep=0pt +\twocolitem{{\bf EVT\_SCROLLWIN(func)}}{Process all scroll events.} +\twocolitem{{\bf EVT\_SCROLLWIN\_TOP(func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-top events.} +\twocolitem{{\bf EVT\_SCROLLWIN\_BOTTOM(func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-bottom events.} +\twocolitem{{\bf EVT\_SCROLLWIN\_LINEUP(func)}}{Process wxEVT\_SCROLL\_LINEUP line up events.} +\twocolitem{{\bf EVT\_SCROLLWIN\_LINEDOWN(func)}}{Process wxEVT\_SCROLL\_LINEDOWN line down events.} +\twocolitem{{\bf EVT\_SCROLLWIN\_PAGEUP(func)}}{Process wxEVT\_SCROLL\_PAGEUP page up events.} +\twocolitem{{\bf EVT\_SCROLLWIN\_PAGEDOWN(func)}}{Process wxEVT\_SCROLL\_PAGEDOWN page down events.} +\twocolitem{{\bf EVT\_SCROLLWIN\_THUMBTRACK(func)}}{Process wxEVT\_SCROLL\_THUMBTRACK thumbtrack events (frequent events +sent as the user drags the thumtrack).} +\twocolitem{{\bf EVT\_COMMAND\_SCROLLWIN(id, func)}}{Process all scroll events.} +\twocolitem{{\bf EVT\_COMMAND\_SCROLLWIN\_TOP(id, func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-top events.} +\twocolitem{{\bf EVT\_COMMAND\_SCROLLWIN\_BOTTOM(id, func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-bottom events.} +\twocolitem{{\bf EVT\_COMMAND\_SCROLLWIN\_LINEUP(id, func)}}{Process wxEVT\_SCROLL\_LINEUP line up events.} +\twocolitem{{\bf EVT\_COMMAND\_SCROLLWIN\_LINEDOWN(id, func)}}{Process wxEVT\_SCROLL\_LINEDOWN line down events.} +\twocolitem{{\bf EVT\_COMMAND\_SCROLLWIN\_PAGEUP(id, func)}}{Process wxEVT\_SCROLL\_PAGEUP page up events.} +\twocolitem{{\bf EVT\_COMMAND\_SCROLLWIN\_PAGEDOWN(id, func)}}{Process wxEVT\_SCROLL\_PAGEDOWN page down events.} +\twocolitem{{\bf EVT\_COMMAND\_SCROLLWIN\_THUMBTRACK(id, func)}}{Process wxEVT\_SCROLL\_THUMBTRACK thumbtrack events (frequent events +sent as the user drags the thumtrack).} +\end{twocollist}% + +\wxheading{See also} + +\helpref{wxWindow::OnScroll}{wxwindowonscroll}, \helpref{wxScrollEvent}{wxscrollevent}, \helpref{Event handling overview}{eventhandlingoverview} + +\latexignore{\rtfignore{\wxheading{Members}}} + +\membersection{wxScrollWinEvent::wxScrollWinEvent} + +\func{}{wxScrollWinEvent}{\param{WXTYPE }{commandType = 0}, \param{int }{id = 0}, \param{int}{ pos = 0}, +\rtfsp\param{int}{ orientation = 0}} + +Constructor. + +\membersection{wxScrollWinEvent::GetOrientation}\label{wxscrollwineventgetorientation} + +\constfunc{int}{GetOrientation}{\void} + +Returns wxHORIZONTAL or wxVERTICAL, depending on the orientation of the scrollbar. + +\membersection{wxScrollWinEvent::GetPosition}\label{wxscrollwineventgetposition} + +\constfunc{int}{GetPosition}{\void} + +Returns the position of the scrollbar. + + diff --git a/docs/latex/wx/scrolevt.tex b/docs/latex/wx/scrolevt.tex index 9e70010e87..e5913b3315 100644 --- a/docs/latex/wx/scrolevt.tex +++ b/docs/latex/wx/scrolevt.tex @@ -1,6 +1,9 @@ \section{\class{wxScrollEvent}}\label{wxscrollevent} -A scroll event holds information about events sent from scrollbars and scrolling windows. +A scroll event holds information about events sent from stand-alone scrollbars, +spin-buttons and sliders - starting from wxWindows 2.1, scrolled windows send the +\helpref{wxScrollWinEvent}{wxscrollwinevent} which does not derive from +wxCommandEvent, but from wxEvent directly. \wxheading{Derived from} @@ -49,7 +52,8 @@ horizontal and vertical scroll events are processed using the same event handler \wxheading{See also} -\helpref{wxWindow::OnScroll}{wxwindowonscroll}, \helpref{wxScrollBar}{wxscrollbar}, \helpref{Event handling overview}{eventhandlingoverview} +\helpref{wxScrollBar}{wxscrollbar}, \helpref{wxSlider}{wxslider}, \helpref{wxSpinButton}{wxspinbutton}, \\ +\helpref{wxScrollWinEvent}{wxscrollwinevent}, \helpref{Event handling overview}{eventhandlingoverview} \latexignore{\rtfignore{\wxheading{Members}}} diff --git a/docs/latex/wx/tevent.tex b/docs/latex/wx/tevent.tex index 6f27ee8060..1dc49fd843 100644 --- a/docs/latex/wx/tevent.tex +++ b/docs/latex/wx/tevent.tex @@ -158,6 +158,7 @@ events which will NOT get sent to the parent's event handler: \twocolitem{\helpref{wxPaintEvent}{wxpaintevent}}{A paint event} \twocolitem{\helpref{wxQueryLayoutInfoEvent}{wxquerylayoutinfoevent}}{Used to query layout information} \twocolitem{\helpref{wxSizeEvent}{wxsizeevent}}{A size event} +\twocolitem{\helpref{wxScrollWinEvent}{wxscrollwinevent}}{An event, sent by a scrolled window, not a scroll bar.} \twocolitem{\helpref{wxSysColourChangedEvent}{wxsyscolourchangedevent}}{A system colour change event} \twocolitem{\helpref{wxUpdateUIEvent}{wxupdateuievent}}{A user interface update event} \end{twocollist} @@ -323,7 +324,7 @@ mouse events or all mouse events.} \twocolitem{\helpref{wxMoveEvent}{wxmoveevent}}{The EVT\_MOVE macro is used to handle a window move.} \twocolitem{\helpref{wxPaintEvent}{wxpaintevent}}{The EVT\_PAINT macro is used to handle window paint requests.} \twocolitem{\helpref{wxScrollEvent}{wxscrollevent}}{These macros are used to handle scroll events from -windows, \helpref{wxScrollBar}{wxscrollbar}, and \helpref{wxSpinButton}{wxspinbutton}.} +\helpref{wxScrollBar}{wxscrollbar}, \helpref{wxSlider}{wxslider},and \helpref{wxSpinButton}{wxspinbutton}.} \twocolitem{\helpref{wxSizeEvent}{wxsizeevent}}{The EVT\_SIZE macro is used to handle a window resize.} \twocolitem{\helpref{wxSplitterEvent}{wxsplitterevent}}{The EVT\_SPLITTER\_SASH\_POS\_CHANGED, EVT\_SPLITTER\_UNSPLIT and EVT\_SPLITTER\_DOUBLECLICKED macros are used to handle the various splitter window events.} diff --git a/docs/latex/wx/treectrl.tex b/docs/latex/wx/treectrl.tex index 4219d1527f..f150147bfd 100644 --- a/docs/latex/wx/treectrl.tex +++ b/docs/latex/wx/treectrl.tex @@ -37,15 +37,15 @@ functions that take a \helpref{wxTreeEvent}{wxtreeevent} argument. \begin{twocollist}\itemsep=0pt \twocolitem{{\bf EVT\_TREE\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.} \twocolitem{{\bf EVT\_TREE\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.} -\twocolitem{{\bf EVT\_TREE\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label.} -\twocolitem{{\bf EVT\_TREE\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label.} +\twocolitem{{\bf EVT\_TREE\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} +\twocolitem{{\bf EVT\_TREE\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_TREE\_DELETE\_ITEM(id, func)}}{Delete an item.} \twocolitem{{\bf EVT\_TREE\_GET\_INFO(id, func)}}{Request information from the application.} \twocolitem{{\bf EVT\_TREE\_SET\_INFO(id, func)}}{Information is being supplied.} \twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDED(id, func)}}{Parent has been expanded.} -\twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDING(id, func)}}{Parent is being expanded.} +\twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDING(id, func)}}{Parent is being expanded. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_TREE\_SEL\_CHANGED(id, func)}}{Selection has changed.} -\twocolitem{{\bf EVT\_TREE\_SEL\_CHANGING(id, func)}}{Selection is changing.} +\twocolitem{{\bf EVT\_TREE\_SEL\_CHANGING(id, func)}}{Selection is changing. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_TREE\_KEY\_DOWN(id, func)}}{A key has been pressed.} \end{twocollist}% @@ -149,16 +149,15 @@ Deletes all the items in the control. \membersection{wxTreeCtrl::EditLabel}\label{wxtreectrleditlabel} -\func{wxTextCtrl*}{EditLabel}{\param{const wxTreeItemId\&}{ item}} +\func{void}{EditLabel}{\param{const wxTreeItemId\&}{ item}} -Starts editing the label of the given item, returning the text control that -the tree control uses for editing. This function generates a -EVT\_BEGIN\_LABEL\_EDIT event and if the event handler returns FALSE, label -editing will not start and NULL will be returned - be ready to handle this -case. +Starts editing the label of the given item. This function generates a +EVT\_TREE\_BEGIN\_LABEL\_EDIT event which can be vetoed so that no +text control will appear for in-place editing. -The text control returned should not be deleted by the application and is not -valid any longer after the EVT\_END\_LABEL\_EDIT event is received. +If the user changed the label (i.e. s/he does not press ESC or leave +the text control without changes, a EVT\_TREE\_END\_LABEL\_EDIT event +will be sent which can be vetoed as well. \wxheading{See also} diff --git a/docs/latex/wx/treeevt.tex b/docs/latex/wx/treeevt.tex index 17c20a0206..2f662cc1e5 100644 --- a/docs/latex/wx/treeevt.tex +++ b/docs/latex/wx/treeevt.tex @@ -22,24 +22,18 @@ functions that take a wxTreeEvent argument. \begin{twocollist}\itemsep=0pt \twocolitem{{\bf EVT\_TREE\_BEGIN\_DRAG(id, func)}}{Begin dragging with the left mouse button.} \twocolitem{{\bf EVT\_TREE\_BEGIN\_RDRAG(id, func)}}{Begin dragging with the right mouse button.} -\twocolitem{{\bf EVT\_TREE\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label.} -\twocolitem{{\bf EVT\_TREE\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label.} +\twocolitem{{\bf EVT\_TREE\_BEGIN\_LABEL\_EDIT(id, func)}}{Begin editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} +\twocolitem{{\bf EVT\_TREE\_END\_LABEL\_EDIT(id, func)}}{Finish editing a label. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_TREE\_DELETE\_ITEM(id, func)}}{Delete an item.} \twocolitem{{\bf EVT\_TREE\_GET\_INFO(id, func)}}{Request information from the application.} \twocolitem{{\bf EVT\_TREE\_SET\_INFO(id, func)}}{Information is being supplied.} \twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDED(id, func)}}{Parent has been expanded.} -\twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDING(id, func)}}{Parent is being expanded.} +\twocolitem{{\bf EVT\_TREE\_ITEM\_EXPANDING(id, func)}}{Parent is being expanded. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_TREE\_SEL\_CHANGED(id, func)}}{Selection has changed.} -\twocolitem{{\bf EVT\_TREE\_SEL\_CHANGING(id, func)}}{Selection is changing.} +\twocolitem{{\bf EVT\_TREE\_SEL\_CHANGING(id, func)}}{Selection is changing. This can be prevented by calling \helpref{Veto()}{wxnotifyeventveto}.} \twocolitem{{\bf EVT\_TREE\_KEY\_DOWN(id, func)}}{A key has been pressed.} \end{twocollist}% -For the EVT\_TREE\_BEGIN\_EDIT, EVT\_TREE\_END\_LABEL\_EDIT, -EVT\_TREE\_ITEM\_EXPANDING and EVT\_TREE\_SEL\_CHANGING events you may call -\helpref{Veto()}{wxnotifyeventveto} to prevent the given operation from -happening except for EVT\_TREE\_END\_LABEL\_EDIT means that the items label -will not be changed. - \wxheading{See also} \helpref{wxTreeCtrl}{wxtreectrl} diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 0df1276c4b..cbfcc44f33 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -1057,10 +1057,10 @@ void wxWindowDC::SetBackground( const wxBrush &brush ) if ((m_backgroundBrush.GetStyle() == wxSTIPPLE) && (m_backgroundBrush.GetStipple()->Ok())) { - if (m_brush.GetStipple()->GetPixmap()) - gdk_gc_set_tile( m_bgGC, m_brush.GetStipple()->GetPixmap() ); + if (m_backgroundBrush.GetStipple()->GetPixmap()) + gdk_gc_set_tile( m_bgGC, m_backgroundBrush.GetStipple()->GetPixmap() ); else - gdk_gc_set_stipple( m_bgGC, m_brush.GetStipple()->GetBitmap() ); + gdk_gc_set_stipple( m_bgGC, m_backgroundBrush.GetStipple()->GetBitmap() ); } if (IS_HATCH(m_backgroundBrush.GetStyle())) diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 0df1276c4b..cbfcc44f33 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -1057,10 +1057,10 @@ void wxWindowDC::SetBackground( const wxBrush &brush ) if ((m_backgroundBrush.GetStyle() == wxSTIPPLE) && (m_backgroundBrush.GetStipple()->Ok())) { - if (m_brush.GetStipple()->GetPixmap()) - gdk_gc_set_tile( m_bgGC, m_brush.GetStipple()->GetPixmap() ); + if (m_backgroundBrush.GetStipple()->GetPixmap()) + gdk_gc_set_tile( m_bgGC, m_backgroundBrush.GetStipple()->GetPixmap() ); else - gdk_gc_set_stipple( m_bgGC, m_brush.GetStipple()->GetBitmap() ); + gdk_gc_set_stipple( m_bgGC, m_backgroundBrush.GetStipple()->GetBitmap() ); } if (IS_HATCH(m_backgroundBrush.GetStyle())) -- 2.45.2