Added SetFont to most controls and controls sample
(recompile) Added tiny bit of documentation to window.cpp git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -429,5 +429,25 @@ bool wxTextCtrl::IsOwnGtkWindow( GdkWindow *window )
|
||||
return (window == GTK_ENTRY(m_text)->text_area);
|
||||
}
|
||||
|
||||
void wxTextCtrl::SetFont( const wxFont &font )
|
||||
{
|
||||
m_font = font;
|
||||
|
||||
GtkStyle *style = (GtkStyle*) NULL;
|
||||
if (!m_hasOwnStyle)
|
||||
{
|
||||
m_hasOwnStyle = TRUE;
|
||||
style = gtk_style_copy( gtk_widget_get_style( m_text ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
style = gtk_widget_get_style( m_text );
|
||||
}
|
||||
|
||||
gdk_font_unref( style->font );
|
||||
style->font = gdk_font_ref( m_font.GetInternalFont( 1.0 ) );
|
||||
|
||||
gtk_widget_set_style( m_text, style );
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user