代码: hello_dubuntu2.c /* 本例的主要目的是在窗口中显示一个按钮, * 并且单击按钮退出程序 */ #include void cb_button(gtkWidget *widget, gpointer data) {// 按钮"button"的回调函数 gtk_main_quit(); } int main(int argc, char *argv[]) { gtkWidget *main_window; //主窗口对象 gtkWidget *button; //将要放置到主窗口中的按钮对象 gtk_init(&argc, &argv); ...
anjuta1.X glade-2 自动生成代码出现Couldn't find pixmap file 后来搜索发现代码可以解决问题 gtk_window_set_icon_from_file(gtk_WINDOW(window1),"ag3.xpm",NULL); 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/11458/showart_223964.html
最近用gtk编程遇到一个奇怪的问题: 有一个普通的按钮,在其clicked信号处理函数里,执行: gtk_widget_set_sensitive(btn, FALSE); // 将其本身灰掉 gtk_widget_set_sensitive(btn, TRUE); // 将其本身再恢复 但如果点击一次按钮之后,再点击该按钮,它不再相响应,而且如果移动鼠标到该按钮所在区域之外,然后再点击该按钮,它就可以响应,如果只是在该按钮所在区域内移动鼠标,点击鼠标没有响应。 不知道怎么回事,有人遇到过...
/* * Copyright (C) 1998-2006 [email=panhuachun@hotmail.com]panhuachun@hotmail.com[/email] * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope t...
gtkButton里包含有gtkTable->gtkLabel/gtkImage... 在按下去的时候所有的信号都被gtkButton捕获了...如何让gtkLable或gtkImage捕获到信号...谢谢