I am trying to center the text inside a TextCtrl. Many solutions to other similar questions rely on using ALIGN_CENTER_VERTICAL
however I cannot do this as I want my text box to be larger than the font height.
This is what I am trying now:
self.name_tb = wx.TextCtrl(self.showing_panel, style=wx.BORDER_NONE | wx.TE_CENTRE)
self.showing_sizer.Add(self.name_tb, 1, flag=wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, border=3)
self.name_tb.SetMinSize((-1, height)) # height > font height
Desired outcome is that the text and the cursor is aligned vertically centered.
This has been asked before here however that answer centers the text horizontally, not vertically: Vertically center text in a wx.TextCtrl widget