Page 1 of 1

wxTextAttr has no member named CreateFont?

Posted: Sun Jul 31, 2011 10:39 am
by dejudicibus
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?

Re: wxTextAttr has no member named CreateFont?

Posted: Sun Jul 31, 2011 1:58 pm
by Auria
Hi,

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

Please use GetFont() instead