.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. module:: wx.lib.wordwrap .. currentmodule:: wx.lib.wordwrap .. highlight:: python .. _wx.lib.wordwrap: ========================================================================================================================================== |phoenix_title| **wx.lib.wordwrap** ========================================================================================================================================== |function_summary| Functions Summary ==================================== ================================================================================ ================================================================================ :func:`~wx.lib.wordwrap.wordwrap` Returns a copy of text with newline characters inserted where long ================================================================================ ================================================================================ | Functions ------------ .. function:: wordwrap(text, width, dc, breakLongWords=True, margin=0) Returns a copy of text with newline characters inserted where long lines should be broken such that they will fit within the given width, with the given margin left and right, on the given `wx.DC` using its current font settings. By default words that are wider than the margin-adjusted width will be broken at the nearest character boundary, but this can be disabled by passing ``False`` for the ``breakLongWords`` parameter.