Search found 2008 matches

by PB
Tue Jul 30, 2019 6:35 am
Forum: C++ Development
Topic: [SOLVED] Tab Traversal Woes
Replies: 12
Views: 174

Re: Tab Traversal Woes

The changelog for 3.2.* - it talks about fixing "several bugs related to TAB_TRAVERSAL. JFYI, there is no wxWidgets 3.2 and hence no changelog for it. Anyway the only issue for tab traversal on GTK I found was this https://github.com/wxWidgets/wxWidgets/commit/2b5574c6ea386502a930a5a2c4f2d0a0e5d2e4...
by PB
Mon Jul 29, 2019 6:23 pm
Forum: C++ Development
Topic: [SOLVED] Tab Traversal Woes
Replies: 12
Views: 174

Re: Tab Traversal Woes

I tried to use the MoveAfter/BeforeInTab Order. I was getting a runtime error on both that complains that the object is not a window and it crashes. The documentation states: Moves this window in the tab navigation order after the specified win. It doesn't reference an object - rather it talks abou...
by PB
Fri Jul 26, 2019 12:56 pm
Forum: C++ Development
Topic: Infinite loop running in the background
Replies: 9
Views: 173

Re: Infinite loop running in the background

Just for comparison, here is a very simple complete example using just wxThread, where instead of Sleep()ing, one could communicate with the device #include <wx/wx.h> #include <wx/thread.h> class MyThread : public wxThread { public: MyThread(wxEvtHandler* sink) : wxThread(wxTHREAD_JOINABLE), m_sink(...
by PB
Thu Jul 25, 2019 8:07 pm
Forum: C++ Development
Topic: Combining title bar and menu bar into one (on Windows)?
Replies: 6
Views: 159

Re: Combining title bar and menu bar into one (on Windows)?

Not every design decision Microsoft makes is a good one - on the contrary. And the amount of space it saves is negligible. I cannot say I like the direction Microsoft has been going since Windows 8. But still: MS Office and File Explorer use the window caption for Quick Access Toolbar (which can be...
by PB
Mon Jul 22, 2019 7:21 pm
Forum: Component Writing
Topic: Making Background of Custom Widget Transparent
Replies: 3
Views: 168

Re: Making Background of Custom Widget Transparent

What exactly is the issue? This naive code #include <wx/wx.h> class BitmapPanel : public wxPanel { public: BitmapPanel(wxWindow* parent, const wxBitmap& bitmap = wxNullBitmap) : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE), m_bitmap(bitmap) { SetBackgroundSty...
by PB
Mon Jul 22, 2019 5:49 pm
Forum: Component Writing
Topic: Problem with treelist on windows o.s.
Replies: 2
Views: 76

Re: Problem with treelist on windows o.s.

Just a blind guess (no pun intended). Try changing SetSizer(sizertreelist); to panel->SetSizer(sizertreelist); EDIT By the way, the Narrator (Windows 10 Pro v1903, English language) narrates the tree in the treectrl sample? And this is kinda expected as wxTreeCtrl on MSW is just a wrapper of the nat...
by PB
Mon Jul 22, 2019 5:31 pm
Forum: C++ Development
Topic: Save and load data in txt file
Replies: 5
Views: 118

Re: Save and load data in txt file

For storing application settings, IMO using wxConfigBase would be the best.

It uses the platform-preferred way to store the structured and typed settings (e.g., Registry on MSW), taking care of platform-specific details (such as where to store the settings in the Registry) as well.
by PB
Mon Jul 22, 2019 5:01 pm
Forum: C++ Development
Topic: Save and load data in txt file
Replies: 5
Views: 118

Re: Save and open data in txt file

If you need to save simple variables in a text file, I would recommend looking into wxFileConfig, see wxConfigBase for description.

My second choice would be wxTextFile, but you will need to do all the parsing by yourself, not that hard actually, particularly if you do not need sections.
by PB
Wed Jul 17, 2019 8:01 pm
Forum: General Forum Issues
Topic: Google search shows page description in French for the forum
Replies: 0
Views: 205

Google search shows page description in French for the forum

Just curious, I noticed that when I google search for "wxwidgets forum", the text in the page description in the search result is in French, taken from the description of the old French forum section:
googleforum.png
While harmless, perhaps it could be somehow fixed...
by PB
Thu Jul 11, 2019 6:53 pm
Forum: C++ Development
Topic: Inputs and Cursor in wxPopup(Transient)Window
Replies: 2
Views: 81

Re: Inputs and Cursor in wxPopup(Transient)Window

You did not say which platform are you using. I could fix similar problem on MSW with calling UseAltPopupWindow() before calling SetPopupControl(): https://forums.wxwidgets.org/viewtopic.php?t=45076#p186665 BTW, IIRC, wxPopupWindow was significantly changed in the master, it had quite some time issu...
by PB
Thu Jul 11, 2019 4:07 pm
Forum: C++ Development
Topic: App crashes on closing
Replies: 5
Views: 111

Re: App crashes on closing

Most likely you put a sizer item (either a window or another sizer) into two (or more) different sizers. I believe that unlike wxSizers, wxWindows are guarded (with an assert) against being put in more than sizer so the culprit is most likely a sizer. The posted code with wxSizerItem's m_kind being...
by PB
Thu Jul 11, 2019 6:38 am
Forum: C++ Development
Topic: User Input
Replies: 11
Views: 235

Re: User Input

BTW, if the text control is for numbers only, you may consider using wxSpinCtrl instead of wxTextCtrl. With wxSpinCtrl you can be sure that the user entered a number and that number is within a range.
by PB
Tue Jul 09, 2019 8:36 pm
Forum: Component Writing
Topic: accessibility for a blinds users on my project
Replies: 14
Views: 674

Re: accessibility for a blinds users on my project

Hello! I have no experience with accessibility but I noticed that you are using wxWidgets version 3.0.4. Accessibility support under Windows should be significantly improved in version 3.1.2 so perhaps you could try this version. While 3.1 branch is marked "unstable", it should be safe to use, in it...
by PB
Tue Jul 09, 2019 6:54 pm
Forum: C++ Development
Topic: Colour List
Replies: 9
Views: 228

Re: Colour List

Good to hear. Still, I think that even the second code example I posted was not that great. It was technically correct but perhaps confusing as it was not really anywhere close to a real-world scenario, where the list items probably would not be mapped to the list item attributes one to one. Hopeful...
by PB
Tue Jul 09, 2019 6:15 am
Forum: C++ Development
Topic: Colour List
Replies: 9
Views: 228

Re: Colour List

PB, Unless you have thousands of items no need to make the control virtual. And I believe the OP is looking to color row/column and not the individual cell(s). ONEEYMAN, gillp28 wrote I want one column to have a label and the other column has the background colour corresponding to the label and eve...