wxTextAttr has no member named CreateFont?

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
User avatar
dejudicibus
Knows some wx things
Knows some wx things
Posts: 32
Joined: Mon Dec 20, 2004 10:28 am
Location: Rome, Italy (EU)
Contact:

wxTextAttr has no member named CreateFont?

Post by dejudicibus » Sun Jul 31, 2011 10:39 am

I am compiling the following piece of code

Code: Select all

wxTextAttr style = control->GetDefaultStyle() ; // wxTextCtrl * control
wxFont font = style.CreateFont() ;
and I get the error message

Code: Select all

'class wxTextAttr' has no member named 'CreateFont'
Looking at wxWidgets 2.9.2 reference guide I found

Code: Select all

wxFont wxTextAttr::CreateFont  (   )  const 
Creates a font from the font attributes. 
So, what I did wrong?

Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Re: wxTextAttr has no member named CreateFont?

Post by Auria » Sun Jul 31, 2011 1:58 pm

Hi,

I'm afraid you found a documentation bug, I submitted a ticket at http://trac.wxwidgets.org/ticket/13372

Please use GetFont() instead
"Keyboard not detected. Press F1 to continue"
-- Windows

Post Reply