/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "radiobut.h"
#endif
-#include "wx/defs.h"
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
#if wxUSE_RADIOBOX
{
// search backward for last group start
wxRadioButton *chief = (wxRadioButton*) NULL;
- wxWindowList::Node *node = parent->GetChildren().GetLast();
+ wxWindowList::compatibility_iterator node = parent->GetChildren().GetLast();
while (node)
{
wxWindow *child = node->GetData();
m_parent->DoAddChild( this );
PostCreation();
-
- SetFont( parent->GetFont() );
+ InheritAttributes();
wxSize size_best( DoGetBestSize() );
wxSize new_size( size );
if ((new_size.x != size.x) || (new_size.y != size.y))
SetSize( new_size.x, new_size.y );
- SetBackgroundColour( parent->GetBackgroundColour() );
- SetForegroundColour( parent->GetForegroundColour() );
-
Show( TRUE );
return TRUE;
wxControl::SetLabel( label );
GtkLabel *g_label = GTK_LABEL( BUTTON_CHILD(m_widget) );
+#ifdef __WXGTK20__
+ wxString label2 = PrepareLabelMnemonics( label );
+ gtk_label_set_text_with_mnemonic( g_label, wxGTK_CONV( label2 ) );
+#else
gtk_label_set( g_label, wxGTK_CONV( GetLabel() ) );
+#endif
}
void wxRadioButton::SetValue( bool val )
}
}
- UpdateWindowUI();
+ if (wxUpdateUIEvent::CanUpdate(this))
+ UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
}
wxSize wxRadioButton::DoGetBestSize() const