Any guess is appreciated too.
- How can I make it single line?
I already removed the automatic SpinCtrl / Scrollbar on the right using “style=wx.TE_RICH2” but it stills expanding to the second line if the given text is big enough.
- How can I calculate the minimum size to display a certain line without scrollbars?
I used to use this with TextCtrl:
dc = wx.ClientDC(rich_text_ctrl)
sx, sy, dummy = dc.GetMultiLineTextExtent(rich_text_ctrl.GetValue())
rich_text_ctrl.SetSize((sx, sy))
But it doesn’t seem to work with RichTextCtrl, the returned value is not big enough to not span a new line.
- Why does it move a few pixels downwards when “SetSize()” is called?
Pictures included. Only a “rich_text_ctrl.SetSize(rich_text_ctrl.GetSize())” function was called between the two images.
Those three questions have been hunting me for the whole day. Does anyone know the answers?