Due to an off by 1 error in wxString::Mid() call, the size computed was too
small and hence the label could have been not displayed at all.
Fix this and also replace Mid(0, n) with a more clear Left(n) call.
Closes#14566.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The other panes were not previously restored, resulting in bad appearance and
behaviour. Do restore them now before making the previous maximized pane
floating.
Closes#14460.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The best size of the window should be at least as large as its min size and
less than its max size. This allows to override the windows own best size
determination with an explicit SetMinSize() or SetMaxSize() call.
See #11497.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is similar to DecTo() but can be used even if the wxSize argument has
some components set to -1.
Notice that we don't need IncToIfSpecified() because IncTo() already works
correctly anyhow in this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Other ports don't send wxEVT_COMMAND_SPINCTRL_UPDATED from SetRange() even if
the value changed because it was adjusted to fit into the new range and this
makes sense as this change is not due to a user action, so don't send this
event under wxMSW neither.
Also add a unit test checking for this behaviour.
Closes#14583.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This reverts r71965 for wxMSW as the list mode there doesn't work correctly if
there are sufficiently many items: the native control insists on laying them
out in multiple columns which is inappropriate for wxListbook, so use report
mode for horizontal wxListbooks. Do use the list mode in the vertical case as
we do want to have multiple columns -- and not rows -- then.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Set the event object and the event ID correctly, i.e. to the values
corresponding to the main wxListCtrl itself, when forwarding mouse and
keyboard events from wxListMainWindow to wxListCtrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Ensure that a parent item that doesn't have any children any more isn't left
with a "-" expander icon, it can't be collapsed any more but only expanded
again (possibly adding children under it dynamically). This results in better
behaviour in e.g. the last page of the dataview sample where the container
item remained with a "+" icon even after its both children were deleted.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For some incomprehensible reason only child branches were ever deleted from
the list of parents children in DeleteItem(), not simple tree items. This
meant that reexpanding a node after deleting all its children showed the
previously "deleted" children again.
Closes#14574.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add the number of the page being printed as well as the total to the
wxMSW printing progress window. Improved the layout and fixed some i18n
issues in the process.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Instead of returning a generic wxWindow*, return the type actually used.
It was part of the public header already, but not used in any publicly
visible way.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Instead of having an empty constructor and filling the dialog with
controls from outside, do the work in the constructor.
This changes the meaning of ctor's 'title' argument, but this class'
terrible API made it unusable for direct use anyway, so it doesn't seem
to be harmful.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It's unexpected for a modal dialog window to show up in the taskbar as
app's another window. It also shouldn't be possible to minimize a modal
window, because it's very confusing when a window is unresponsive
without a clear reason, because the modal child is hidden in the
taskbar.
Set wxFRAME_NO_TASKBAR and remove wxMINIMIZE_BOX to fix this. Do it only
for wxPreviewFrame_AppModal.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Just use the usual pattern, instead of abusing existing m_refData. In
addition to being cleaner and easier to follow, it also has the benefit
of not crashing when cloning ref data into an UnRef()ed bitmap from
AllocExclusive().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This reverts r70556, i.e. removes the scope operators added by it to all
WX_DECLARE_HASH_{MAP,SET} macros, and implements a workaround for the problem
due to the use of empty base class optimization in g++ 4.7 standard library
implementations inside the macros themselves by prepending the hasher and
comparator classes with explicit "struct".
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxTLW wasn't properly restored if Iconize(false) was called while the window
was hidden.
Fix this by adding yet another special case to wxTopLevelWindowMSW::Show().
This makes it even less comprehensible than before but there doesn't seem to
be any obvious way to simplify this code without totally changing it.
Closes#14539.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
r62940 fixed an appearance problem with the checkboxes in wxDataViewCtrl but
introduced another one: as the checkbox was now always drawn in the entire
cell rectangle, the cell alignment was not taken into account any more.
Fix this by only increasing the checkbox rectangle up to the required minimal
size but not any more.
Closes#14504.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxNO_WEBVIEW_LIB was documented but not implemented: webview library was never
linked in implicitly at all. Fix this by adding the missing #pragma to
msvc/wx/setup.h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775