Don't assert if an already hidden/shown row/column is being hidden/shown again
but simply don't do anything. This is more convenient because the code outside
wxGrid has no efficient way to only hide a row/column if it's currently shown.
Closes#14960.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73366 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't call SetScrollbars(), this is overridden by sizer logic later. Instead,
add a sufficiently big window to the popup and make fix the size of the popup
itself to be smaller to ensure that the scrollbars do show.
Closes#14900.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method didn't really exist, the code only worked because it connected to
wxApp::OnIdle() which exists in wxMSW but not the other ports.
Simply remove the apparently unnecessary call.
See #13902.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Break into the debugger in the function containing the assert that failed
instead of inside wxWidgets assert handler which is several (~8) levels below
the last line of the user code. This is much more useful in practice and also
less confusing.
Currently this only works for MSVC as the other compilers don't have any
__debugbreak intrinsice equivalent.
Also update the except sample to test wxTrap() directly too.
Closes#11184.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The code added in r52154 never worked because it was looking for the Progid
value in a wrong place, look for it under UserChoice subkey where it really
is.
Also add a way to look up the command to open files with the given extension
to the exec sample.
Closes#12302.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Move all file association related commands under "File" menu from the "Exec"
one, having them there makes more sense and "Exec" menu is already quite big.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add accessors returning more convenient wxVectors to supplement the existing
ones giving access to internally used wxLists.
Closes#14814.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Implement it for the native MSW and GTK versions and the generic one used in
the other ports and also for wxSpinCtrlDouble under MSW.
Also test this function in the spin page of the widgets sample.
Closes#14840.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This flag generates the corresponding event when the file system containing
the watched directory is unmounted. Currently it is only implemented for
Linux where unmounting now generates this event instead of an error.
Closes#14834.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This flag allows to monitor changes to the file attributes, such as file
modification time.
This patch adds the flag, support for it under Linux and the corresponding
modifications to the sample and the test suite.
Closes#14833.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function can be used to size a, say, wxTextCtrl to be exactly of the size
needed to enter the given amount of text in it.
This patch adds wxGTK implementation for wxTextCtrl, wxChoice and wxCombobox;
changes to the samples and the documentation.
Closes#14812.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This was broken by r72581, add event.Skip() call to the handler for this event
added there.
Also add a handler for this event to the corresponding page of the widgets
sample to be able to test this.
Closes#14799.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use CreateStdDialogButtonSizer() instead of constructing
wxStdDialogButtonSizer directly, not only this is shorter but it also makes
the "OK" button default correctly.
Also initialize the labels instead of leaving them initially empty.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The sample contains disabled code for using other type of windows than
MyCanvas for the splitter children but it didn't compile any more because the
variables were declared as wxScrolledWindow. Fix this by using just wxWindow
for them.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Comparing paths using wxString is a bad idea as identical paths can be seen as
mismatching because of case-only differences.
Also, don't reset wxRadioBox selection from its selection handler, this
doesn't work under e.g. wxGTK and is a bad example.
Closes#14791.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxXmlResourceHandlerImplBase::GetAnimation() returned wxAnimation by value
which created references to wxAnimationCtrlNameStr and wxNullAnimation
symbols, defined in the "adv" library, in "core" when using Sun CC even though
they were not referenced directly.
Fix this by returning wxAnimation by pointer to keep it opaque for "core" code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There were two fundamental problems: first, we painted on a separately created
wxClientDC instead of using the wxPaintDC already available in wxGrid. Second,
we invalidated the control while painting, resulting in endless repainting, at
least under wxGTK.
Fix the first problem by passing wxDC to wxGridCellEditor::PaintBackground()
and the second one by not refreshing the control from there as it just seems
unnecessary.
Also pass the attribute by reference for consistency with
wxGridCellRenderer::Draw() and because this pointer can never be NULL.
Closes#2628.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow making TAB/Shift-TAB wrap to the next/previous row or going to the
next/previous control when the cursor is at the end/beginning of the current
row easily.
Also add wxEVT_GRID_TABBING event to allow customizing TAB behaviour even
further.
Update the sample to show the different possible standard behaviours and a
stupid example of a custom one (it would be probably more useful to implement
something a tad more realistic, e.g. tabbing to the next non-empty cell).
Closes#14711.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Do this for consistency with all the other ones and also because it makes it
simpler to notice any unwanted icons for hidden windows created by this sample.
See #13251.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Mostly copy wxGenericTreeCtrl incremental search implementation to
wxGenericListCtrl (unfortunately there is no simple way to reuse this code
currently), including the recently added EnableBellOnNoMatch() method.
Update the sample to test it, the key event handling in it had to be modified
to allow it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For consistency with Windows, allow to optionally generate a beep when
incremental search in the tree control doesn't find anything.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is no need to clear the control contents before loading a file into it
because LoadFile() is supposed to do this on its own (although currently it
doesn't, which will be fixed soon).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't show "About" dialog on startup, this has nothing to do with the purpose
of this sample and is just annoying.
Also, don't select the entire file after opening it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775