Opened 9 years ago

Closed 9 years ago

#9699 closed defect (fixed)

Misleading Explanation in wxSizerFlags Documentation

Reported by: charles Owned by:
Priority: normal Milestone:
Component: documentation Version: stable-latest
Keywords: Cc:
Blocked By: Blocking:
Patch: yes


Examine the Detailed Description section of the documentation of the wxSizerFlags class as derived by Doxygen from the \interface\wx\sizer.h file at The second paragraph implies that the two example code lines are equivalent in that a border of 10 pixels will be used on all sides. In fact, if one replaces

sizer->Add(ctrl, 0, wxEXPAND | wxALL, 10);


sizer->Add(ctrl, wxSizerFlags().Expand().Border(10));

a border of 0 pixels all around will probably be the result. The correct replacement line is

sizer->Add(ctrl, wxSizerFlags().Expand().Border(wxALL, 10));

(See the Border function source code starting at line 126 of \include\wx\sizer.h.)

The attached patch adds the wxALL flag in two places.

Attachments (1)

sizer.patch download (707 bytes) - added by charles 9 years ago.
Patch for \interface\wx\sizer.h

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by charles

Patch for \interface\wx\sizer.h

comment:1 Changed 9 years ago by vadz

  • Resolution set to fixed
  • Status changed from new to closed

Thanks a lot for noticing this!

Committed as r54602.

Note: See TracTickets for help on using tickets.