Creating a wxStaticText control in C++20 fails (Issue #22656)

26 views
Skip to first unread message

David Connet

unread,
Jul 20, 2022, 6:32:29 PM7/20/22
to wx-...@googlegroups.com, Subscribed

new wxStaticText(this, wxID_ANY, text, wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE | wxSTATIC_BORDER); 

This will fail with "operator '|': deprecated between enumerations of different types"

Need to add "wxALLOW_COMBINING_ENUMS(wxAlignment, wxBorder)" in defs.h


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22656@github.com>

David Connet

unread,
Jul 31, 2022, 1:18:08 PM7/31/22
to wx-...@googlegroups.com, Subscribed

Looks like that one 'allow' wasn't enough (I must have forgotten to unsuppress the warning when testing earlier, sorry!)
In my code, I also needed to add:

wxALLOW_COMBINING_ENUMS(wxSizerFlagBits, wxAlignment)
wxALLOW_COMBINING_ENUMS(wxSizerFlagBits, wxDirection)
wxALLOW_COMBINING_ENUMS(wxSizerFlagBits, wxStretch)

because of my use of wxRESERVE_SPACE_EVEN_IF_HIDDEN on sizers.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22656/1200465098@github.com>

VZ

unread,
Jul 31, 2022, 1:28:40 PM7/31/22
to wx-...@googlegroups.com, Subscribed

Thanks, I'll create a new issue for this because I'd actually already backported this one to 3.2 (but it didn't get closed because only commits to master really close issues, argh).


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/22656/1200466730@github.com>

VZ

unread,
Jul 31, 2022, 1:28:41 PM7/31/22
to wx-...@googlegroups.com, Subscribed

Closed #22656 as completed.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issue/22656/issue_event/7096621393@github.com>

Reply all
Reply to author
Forward
0 new messages