Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#17390 closed defect (fixed)

wxStaticText gets wider on each SetLabel call in wxGTK

Reported by: swt2c Owned by:
Priority: normal Milestone:
Component: wxGTK Version: 3.0.2
Keywords: Cc:
Blocked By: Blocking:
Patch: no


As reported by a Fedora user, wxStaticText gets wider each time SetLabel() is called on it. Attached is a simple reproducer program. The cause appears to be this near the end of DoGetBestSize():

 // Adding 1 to width to workaround GTK sometimes wrapping the text needlessly

Attachments (1)

label-size.cpp download (1.6 KB) - added by swt2c 5 years ago.

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by swt2c


comment:1 Changed 5 years ago by pcor

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

This was already fixed in master, by 6ed7e27. Now also applied to 3.0 branch as 2bc3721

comment:2 Changed 5 years ago by swt2c

My bad, I saw that commit previously but didn't put two and two together. Thanks again!

Note: See TracTickets for help on using tickets.