Search found 1707 matches

by PB
Fri Oct 12, 2018 5:19 am
Forum: Compiler / Linking / IDE Related
Topic: Linking OpenGL and wxWidgets
Replies: 5
Views: 160

Re: Linking OpenGL and wxWidgets

In the process, I only want to use wxCore, wxBase, wxglContext and wxglCanvas of wxWidgets. What should I do? I think not using any wxWidgets class not provided in any of the listed libraries. That should be it. If you mean how you actually setup the build chain, that depends on your platform, comp...
by PB
Wed Oct 10, 2018 6:36 pm
Forum: C++ Development
Topic: "Problems porting from wxWidgets-3.0.4 to 3.1.1"
Replies: 2
Views: 51

Re: "Problems porting from wxWidgets-3.0.4 to 3.1.1"

You are probably using a deprecated wxFont constructor which looks like this wxFont(int size, int family, int style, int weight, bool underlined = false, const wxString& face = wxEmptyString, wxFontEncoding encoding = wxFONTENCODING_DEFAULT) Use this one instead. Better yet, use wxFontInfo .
by PB
Tue Oct 09, 2018 5:24 am
Forum: C++ Development
Topic: How to know the down-left coordinate of one of toolbutton in wxToolbar
Replies: 10
Views: 149

Re: How to know the down-left coordinate of one of toolbutton in wxToolbar

Well, after looking at the wxToolBar API (and its MSW source), I believe it is not possible (unless using horrible hacks such as iterative calls to FindToolByPosition).
by PB
Mon Oct 08, 2018 8:27 pm
Forum: C++ Development
Topic: Toolbar button to append textctrl [SOLVED]
Replies: 2
Views: 220

Re: Toolbar button to append textctrl [SOLVED]

I think you ran into a common Connect bug - you did not specify the event sink so it was set to the caller, i.e., m_toolbar. However, the method is called for wxFrame instance. If it is as I say it is, change the connect call to m_toolBar->Connect(idToolBarButton, wxEVT_COMMAND_TOOL_CLICKED, wxComma...
by PB
Mon Oct 08, 2018 6:02 pm
Forum: C++ Development
Topic: Number as text input
Replies: 4
Views: 181

Re: Number as text input

by PB
Mon Oct 08, 2018 10:10 am
Forum: C++ Development
Topic: GUI (Keyboard) Focus [SOLVED]
Replies: 4
Views: 169

Re: GUI (Keyboard) Focus [SOLVED]

Isn't the "staying blue colour" on the OK button just an indicator of the default button? The default command button in a window indicates the command button that will be activated when users press the Enter key. Any command button becomes the default when users tab to it. If the input foc...
by PB
Fri Oct 05, 2018 12:16 pm
Forum: Platform Related Issues
Topic: Dialogs end up behind wxFRAME_FLOAT_ON_PARENT frames
Replies: 1
Views: 73

Re: Dialogs end up behind wxFRAME_FLOAT_ON_PARENT frames

I see there was a ticket created for this (link below), but it is really confusing whether it was fixed or not? Why did you find it confusing, the ticket was closed as "fixed" and there is a link to a commit fixing the issue: https://github.com/wxWidgets/wxWidgets/commit/ef3c0c83af5f9854f...
by PB
Wed Oct 03, 2018 6:44 pm
Forum: C++ Development
Topic: wxDataViewCtrl implementation failure
Replies: 9
Views: 127

Re: wxDataViewCtrl implementation failure

I could not reproduce the issue. I replaced contents of the dataview.cpp in dataview sample (and removed unused files from the project) with #include <wx/wx.h> #include <wx/dataview.h> class MyFrame : public wxFrame { public: MyFrame() : wxFrame(NULL, wxID_ANY, "Test", wxDefaultPosition, w...
by PB
Mon Oct 01, 2018 5:22 am
Forum: C++ Development
Topic: deleting node from wxList
Replies: 4
Views: 112

Re: deleting node from wxList

I mean, is better if I go and use standard containers rather than their Wx counterpart/implementation? wxWidgets containers originate from the era where STL was not available on all supported platforms. AFAIK, you should use standard containers in your code, unless wxWidgets API forces you to use o...
by PB
Sun Sep 30, 2018 4:44 pm
Forum: C++ Development
Topic: deleting node from wxList
Replies: 4
Views: 112

Re: deleting node from wxList

wxWidgets documentation claims that wxList is std::list compatible. Therefore I suppose the orthodox way is to use the erase-remove idiom. However, the old way you use should work but I guess std compatible containers are usually iterated differently, see e.g. wxList docs. Edit Here is an example of...
by PB
Thu Sep 27, 2018 8:53 pm
Forum: C++ Development
Topic: wxImage to buffer and back [SOLVED]
Replies: 5
Views: 196

Re: wxImage to buffer and back [SOLVED]

Thank you very much PB, that works perfectly. I guess then the issue I had was not using malloc on the wxImage initialization As I wrote in my first post, I believe that the main issue was that you wrote only the array of RGB triplets obtained by wxImage::GetData() unsigned int byteCount = image.Ge...
by PB
Thu Sep 27, 2018 8:21 pm
Forum: C++ Development
Topic: wxImage to buffer and back [SOLVED]
Replies: 5
Views: 196

Re: wxImage to buffer and back [SOLVED]

So you can do it as I showed in my previous post, right? If you for some reason need to use wxMemoryBuffer, you can do it for example like this bool wxImageToMemoryBuffer(const wxImage& image, wxMemoryBuffer& buffer) { wxCHECK(image.IsOk(), false); wxMemoryOutputStream stream; if ( !image.Sa...
by PB
Thu Sep 27, 2018 6:33 pm
Forum: C++ Development
Topic: wxImage to buffer and back [SOLVED]
Replies: 5
Views: 196

Re: wxImage to buffer and back [SOLVED]

For starters: I would assume that the image data (i.e., an array or RGB values) is not a format that wxImage::LoadFile(x, wxBITMAP_TYPE_BMP) expects. If you write wxImage data, you need to read them as such. TBH, I am not exactly sure what you want to achieve with your code... Edit This works bool w...
by PB
Thu Sep 27, 2018 6:13 pm
Forum: C++ Development
Topic: Custom tree control
Replies: 2
Views: 59

Re: Custom tree control

Does it really need to be a tree? I would just have a panel with all those controls sitting in appropriate sizers and the panel would be shown/hidden on clicking the checkbox (= tree root) similarly to what wxCollapsiblePane does. And that's assuming that the controls need to be hidden and not just ...
by PB
Thu Sep 27, 2018 8:47 am
Forum: C++ Development
Topic: wxListCtrl row height [SOLVED]
Replies: 3
Views: 226

Re: wxListCtrl row height [SOLVED]

Sorry for stupid question but did you try to make the image "gap" not white but transparent?

Go to advanced search