Python PyGTK移动小部件
我想知道启动应用程序后是否可以重新编辑Python PyGTK移动小部件,python,python-3.x,user-interface,gtk,pygtk,Python,Python 3.x,User Interface,Gtk,Pygtk,我想知道启动应用程序后是否可以重新编辑fixed.put(image,xx,yy)的坐标 xx = 100 yy = 100 def callback(window, event): print ('Clicked at x=', event.x, "and y=", event.y) image.show() GLib.timeout_add(100, image.hide) fixed.put(image, xx, yy) 现在,我的输出如下: (pyt
fixed.put(image,xx,yy)
的坐标
xx = 100
yy = 100
def callback(window, event):
print ('Clicked at x=', event.x, "and y=", event.y)
image.show()
GLib.timeout_add(100, image.hide)
fixed.put(image, xx, yy)
现在,我的输出如下:
(python.exe:11204): Gtk-CRITICAL **: 17:05:03.097: gtk_fixed_put: assertion '_gtk_widget_get_parent (widget) == NULL' failed
谢谢。从错误消息中,您已经在容器中设置了图像。假设是固定的,你应该使用
fixed.move(image,xx,yy)
Relevant,@Nico238是的,那就是我需要的,谢谢。