Search found 35 matches
- Sat Mar 27, 2021 1:22 pm
- Forum: C++ Development
- Topic: How "wxStdDialogButtonSizer" works
- Replies: 3
- Views: 1063
Re: How "wxStdDialogButtonSizer" works
I modified your code, the below should work. It uses Bind() instead of Connect() https://docs.wxwidgets.org/3.0/overview_events.html wxFAIL_MSG() will show a message box if in debug mode, does nothing in release. If you click Stop it will break into your code at the wxFAIL_MSG else continues executi...
- Sat Mar 27, 2021 12:02 pm
- Forum: C++ Development
- Topic: wxNumberFormatter::ToString
- Replies: 12
- Views: 1807
Re: wxNumberFormatter::ToString
There is an open source library called fmt that can most text formatting needs. Documentation is very good. It is compatible with the c++ STL, compile wxWidgets with STL compatibility turned on. You can use as header only, or compile it into a lib (I use static lib). It has many other useful feature...
- Thu Mar 25, 2021 12:54 pm
- Forum: C++ Development
- Topic: wxAuiNotebook Vertical Scrolling
- Replies: 6
- Views: 2745
Re: wxAuiNotebook Vertical Scrolling
Using wxWidgets 3.1.3 I use almost exactly the same setup and have no problems with scrolling. My wxAuiNotebook page base is derived from wxScrolled, uses a wxFlexGridSizer, and has a wxCollapsiblePane control in addition to the other buttons, text boxes, and etc. When the collapsible pane is toggle...
- Thu Jan 30, 2020 4:14 pm
- Forum: C++ Development
- Topic: wxGridCellTextEditor::GetValue() nullptr exception
- Replies: 3
- Views: 658
Re: wxGridCellTextEditor::GetValue() nullptr exception
When I get some time I will research how to properly post to the list/file bug report, right now this gets the info out there in case anyone else runs into the same problem.
Thank you for the heads up.
Thank you for the heads up.
- Thu Jan 30, 2020 1:50 pm
- Forum: C++ Development
- Topic: wxGridCellTextEditor::GetValue() nullptr exception
- Replies: 3
- Views: 658
wxGridCellTextEditor::GetValue() nullptr exception
src/generic/grideditors.cpp, starting at line 664 has the offending function which does not contain a nullptr check on the pointer returned from Text(). // return the value in the text control wxString wxGridCellTextEditor::GetValue() const { return Text()->GetValue(); } I have custom tabbing which ...
- Wed Jun 19, 2019 9:13 pm
- Forum: C++ Development
- Topic: wxAuiToolBar - delete separator
- Replies: 7
- Views: 942
Re: wxAuiToolBar - delete separator
I wonder if GetToolCount() would work for you, store the highest index before you add anything then DeleteByIndex() all of the items after that one when you are ready to remove the added tools. That is assuming you always add/remove from the end. DeleteByIndex(int tool_id) I think is actually Delete...
- Wed Jun 19, 2019 5:38 pm
- Forum: C++ Development
- Topic: How change wxAuiManager behaviour?
- Replies: 4
- Views: 806
Re: How change wxAuiManager behaviour?
Your best bet for understanding is to change those flags, recompile, and see how the layout changes.
Change wxLEFT to wxRIGHT, compile and see how it looks.
Change wxBOTTOM to wxTOP, compile, and see how it looks.
... and so on.
Change wxLEFT to wxRIGHT, compile and see how it looks.
Change wxBOTTOM to wxTOP, compile, and see how it looks.
... and so on.
- Wed Jun 19, 2019 5:34 pm
- Forum: C++ Development
- Topic: wxAuiToolBar - delete separator
- Replies: 7
- Views: 942
Re: wxAuiToolBar - delete separator
I usually clear the complete toolbar then rebuild it with the needed tools and layout as required. You can have a function to do that with an enum argument that lists your various layouts. Doing it that way produces easier to read and modify code down the road.
- Wed Jun 19, 2019 4:13 pm
- Forum: C++ Development
- Topic: wxAuiToolBar - delete separator
- Replies: 7
- Views: 942
Re: wxAuiToolBar - delete separator
There are DeleteTool() and DeleteByIndex() functions.
Read the docs: https://docs.wxwidgets.org/3.1.2/classw ... 7ddca4517d
Read the docs: https://docs.wxwidgets.org/3.1.2/classw ... 7ddca4517d
- Wed Jun 19, 2019 4:05 pm
- Forum: C++ Development
- Topic: How change wxAuiManager behaviour?
- Replies: 4
- Views: 806
Re: How change wxAuiManager behaviour?
I am not sure exactly what you mean but the code to position the panes is // add the panes to the manager m_mgr.AddPane(text1, wxLEFT, wxT("Pane Number One")); m_mgr.AddPane(text2, wxBOTTOM, wxT("Pane Number Two")); m_mgr.AddPane(text3, wxCENTER); The panes are positioned with th...
- Tue Apr 09, 2019 12:23 pm
- Forum: C++ Development
- Topic: wxAui - remove pane border
- Replies: 13
- Views: 7741
Re: wxAui - remove pane border
It also works to put the code in the constructor of a wxAuiNotebook derived class #include "wx/aui/aui.h" // This is the only include needed (I am using wx 3.1.x) AuiNotebookDerivedConstructor(...) { /* Remove border drawn by the wxAuiDefaultDockArt that wxAuiManager uses internally*/ wxAu...
- Wed Jan 30, 2019 6:14 pm
- Forum: C++ Development
- Topic: Sizer's question
- Replies: 3
- Views: 830
Re: Sizer's question
Sure you can, just Hide()the current page, call Remove() on it, then call Add() on the other page and Show().
I often keep "stacks" of hidden windows and swap them in/out of notebook pages as needed.
I often keep "stacks" of hidden windows and swap them in/out of notebook pages as needed.
- Wed Jan 30, 2019 3:55 pm
- Forum: C++ Development
- Topic: Sizer's question
- Replies: 3
- Views: 830
Re: Sizer's question
Is it possible to change a sizer's flags after the creation of a sizer? Say I wanted a horizontal BoxSizer to expand only under certain circumstances, or wanted to add and remove the wxRESERVE_SPACE_EVEN_IF_HIDDEN flag? I am not sure about the wxRESERVE_SPACE_EVENT_IF_HIDDEN flag but you can certai...
- Wed Jan 30, 2019 3:30 pm
- Forum: C++ Development
- Topic: wxRadioBox without default selection
- Replies: 3
- Views: 767
Re: wxRadioBox without default selection
From the wxRadioBox docs virtual void wxRadioBox::SetSelection ( int n ) Sets the selection to the given item. Notice that a radio box always has selection , so n must be valid here and passing wxNOT_FOUND is not allowed. So to answer your question specifically for the wxRadioBox: You must have a se...
- Wed Jan 30, 2019 3:17 pm
- Forum: Platform Related Issues
- Topic: Widgets look flat in wxFormbuilder, but not when compiled in IDE
- Replies: 11
- Views: 2603
Re: Widgets look flat in wxFormbuilder, but not when compiled in IDE
Do the buttons in your compiled application appear the same as buttons in other Windows applications? wxWidgets uses the windows theme by default. I am not aware of any workaround except to use wxUniversal which draws its own controls. If you are willing to make bitmaps for all of your buttons and t...