Guest User

Untitled

a guest
Nov 21st, 2015
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.63 KB | None | 0 0
  1. void drawBoard(GtkWidget* table, GtkWidget** entries[][9])
  2. {
  3.     for(last_i=1; last_i<10; last_i++)
  4.     {
  5.         for(last_j=1; last_j<10; last_j++)
  6.         {
  7.             addField(entries[last_i][last_j],table);
  8.             gtk_entry_set_width_chars(entries[last_i][last_j], 2); //<-- w tym miejscu program siÄ™ wysypuje
  9.         }
  10.  
  11.     }
  12.  
  13. }
  14. void addField(GtkWidget* field, GtkWidget *table)
  15. {
  16.     field = gtk_entry_new_with_max_length(1);
  17.     gtk_table_attach_defaults (GTK_TABLE (table), field, last_j-1, last_j, last_i-1, last_i);
  18.     //reszta funkcji
  19.  
  20. }
  21. int main(){
  22.  
  23. GtkWidget *entries[9][9];
  24. drawBoard(table, entries);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment