2014-05-05 65 views
-2

我將如何去寫一個if語句來檢查,如果「COL_NUMBER」是例如「3」,這是我得到的代碼:如果聲明爲樹列表值?

gtk_list_store_append (store, &iter); 
    gtk_list_store_set (store, &iter, 
         COL_NUMBER, 3, 
         -1); 

renderer = gtk_cell_renderer_text_new(); 
    gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view), 
               0,  
               "Number", 
               renderer, 
               "text", COL_NUMBER, 
               NULL); 
+1

你想知道什麼?如何在[tag:c]中編寫if語句? –

回答

0

從TreeModel中,使用gtk_tree_model_get獲得價值() ;