Search code examples
wxpythonwxwidgets

What's the best way to add a chat control with Python wxWidgets? (wxpython)


I'm programming a chatbot that has an interface similar to MSN's one.

I need a control with white background that needs to be scrollable so it only shows most recent messages. I'm using a StaticText control but probably there's something better.

I understand that probably I could just create a label every time there's a new text and put that into a scrollable panel but I want to know if there's a better alternative.


Solution

  • A readonly wxTextCtrl (with attributes allowing you to use colours/bold/italic, but not much more), wxRichTextCtrl (with many more features, but quite a bit slower) or even wxHtmlWindow would all be much better alternatives than using multiple wxStaticText controls.