I am using GTK+2 for GUI in C language. I have 10x10 table of buttons in my code. And When I run my code, the 1st button (button[0][0])
is focused by default. So how can I can prevent this button to be focused by default?
Code:
table = gtk_table_new(10, 10, TRUE);
for (int row=0; row<10; row++) {
for (int col=0; col<10; col++) {
button[row][col] = gtk_button_new_with_label(" ");
g_signal_connect(G_OBJECT(button[row][col]), "button-release-event", G_CALLBACK(buttonClicked), NULL);
gtk_button_set_focus_on_click(GTK_BUTTON(button[row][col]), FALSE);
gtk_table_attach_defaults(GTK_TABLE(table), button[row][col], col, col+1, row, row+1);
}
}