Search code examples
wxpythonwxwidgets

How do I right align the text in a wx.ComboBox?


I have a combobox in wxpython but I cant figure out how to align the text it contains to the right?

I have tried to use wx.ComboBox(self, choices=["1","2","3"], style=wx.TEXT_ALIGNMENT_RIGHT) but that didnt work.


Solution

  • The widget probably doesn't support text alignment. If you want complete control over how it displays its contents, then you should probably switch to a custom drawn control, such as ComboCtrl.