wxStaticText formatting

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
dohpam1ne
Earned a small fee
Earned a small fee
Posts: 13
Joined: Thu May 14, 2020 11:27 pm

wxStaticText formatting

Post by dohpam1ne »

Hi all,

Is it possible to set formatting properties like text size and background color in wxStaticText or similar classes like wxTextCtrl? I'm attempting to create a title within my panel and I'd like to make it stand out a bit more than the default text. My current application looks like this:

Image
User avatar
doublemax
Moderator
Moderator
Posts: 19115
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxStaticText formatting

Post by doublemax »

There are methods like wxWindow::SetBackgroundColour() or wxWindow::SetFont() (for different text size) in the base class wxWindow.

https://docs.wxwidgets.org/trunk/classw ... d83b25d8a0
Use the source, Luke!
dohpam1ne
Earned a small fee
Earned a small fee
Posts: 13
Joined: Thu May 14, 2020 11:27 pm

Re: wxStaticText formatting

Post by dohpam1ne »

Awesome, thanks a lot. :)
Post Reply