extern "C" {
static void gtk_togglebutton_clicked_callback(GtkWidget *WXUNUSED(widget), wxToggleButton *cb)
{
- if (g_isIdle)
- wxapp_install_idle_handler();
-
if (!cb->m_hasVMT || g_blockEventsOnDrag)
return;
const wxValidator& validator,
const wxString &name)
{
- m_needParent = true;
- m_acceptsFocus = true;
-
m_blockEvent = false;
if (!PreCreation(parent, pos, size) ||
const wxValidator& validator,
const wxString &name)
{
- m_needParent = true;
- m_acceptsFocus = true;
-
m_blockEvent = false;
if (!PreCreation(parent, pos, size) ||
return false;
}
- wxControl::SetLabel(label);
-
// Create the gtk widget.
- m_widget = gtk_toggle_button_new_with_label( wxGTK_CONV( m_label ) );
+ m_widget = gtk_toggle_button_new_with_mnemonic("");
+
+ SetLabel(label);
g_signal_connect (m_widget, "clicked",
G_CALLBACK (gtk_togglebutton_clicked_callback),
wxControl::SetLabel(label);
- gtk_label_set_text(GTK_LABEL(GTK_BIN(m_widget)->child), wxGTK_CONV(GetLabel()));
+ const wxString labelGTK = GTKConvertMnemonics(label);
+
+ gtk_button_set_label(GTK_BUTTON(m_widget), wxGTK_CONV(labelGTK));
+
+ ApplyWidgetStyle( false );
}
bool wxToggleButton::Enable(bool enable /*=true*/)