Width of sub-label is calculated by using of GetTextExtent() instead of PaintDC->GetMultiLineTextExtent, because of PaintDC is not OK sometimes. For example on GTK3 PaintDC->IsOk() only, when it's using in a native paint event see https://github.com/wxWidgets/wxWidgets/blob/master/src/gtk/dc.cpp, line 346