2011年07月18日 星期一 20:52
我现在想做个标准的窗口!google到了这个界面,
能把你的代码给我发一份吗?我想学习学习!
邮箱:truman1900@126.com
谢谢啦!
2011年07月19日 星期二 06:04
2011年07月19日 星期二 10:52
chaco
title = u'汉字' 会出错,界面也无法显示
2011年07月19日 星期二 11:15
把出错信息贴出来吧。
请检查你的源程序是否是utf-8编码的,然后文件最开始是否有:
# -*- coding: utf-8 -*-
2011年07月19日 星期二 14:30
很长,他会一直提示下去
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\enable-3.3.2-py2.6-win32.egg\enthought\enable\abstract_window.py", line 350, in _paint
self.component.draw(gc, view_bounds=(0, 0, size[0], size[1]))
File "C:\Python26\lib\site-packages\enable-3.3.2-py2.6-win32.egg\enthought\enable\component.py", line 425, in draw
self._draw(gc, view_bounds, mode)
File "C:\Python26\lib\site-packages\enable-3.3.2-py2.6-win32.egg\enthought\enable\component.py", line 761, in _draw
self._dispatch_draw(layer, gc, view_bounds, mode)
File "C:\Python26\lib\site-packages\enable-3.3.2-py2.6-win32.egg\enthought\enable\container.py", line 326, in _dispatch_draw
component._dispatch_draw(layer, gc, new_bounds, mode)
File "C:\Python26\lib\site-packages\enable-3.3.2-py2.6-win32.egg\enthought\enable\container.py", line 338, in _dispatch_draw
my_handler(gc, view_bounds, mode)
File "C:\Python26\lib\site-packages\enable-3.3.2-py2.6-win32.egg\enthought\enable\container.py", line 349, in _draw_container_overlay
self._draw_overlay(gc, view_bounds, mode)
File "C:\Python26\lib\site-packages\enable-3.3.2-py2.6-win32.egg\enthought\enable\component.py", line 868, in _draw_overlay
overlay.overlay(self, gc, view_bounds, mode)
File "C:\Python26\lib\site-packages\chaco-3.3.2-py2.6-win32.egg\enthought\chaco\plot_label.py", line 77, in overlay
self._draw_overlay(gc, view_bounds, mode)
File "C:\Python26\lib\site-packages\chaco-3.3.2-py2.6-win32.egg\enthought\chaco\plot_label.py", line 108, in _draw_overlay
width, height = self._label.get_bounding_box(gc)
File "C:\Python26\lib\site-packages\chaco-3.3.2-py2.6-win32.egg\enthought\chaco\label.py", line 126, in get_bounding_box
width, height = self.get_width_height(gc)
File "C:\Python26\lib\site-packages\chaco-3.3.2-py2.6-win32.egg\enthought\chaco\label.py", line 119, in get_width_height
self._calc_line_positions(gc)
File "C:\Python26\lib\site-packages\chaco-3.3.2-py2.6-win32.egg\enthought\chaco\label.py", line 88, in _calc_line_positions
(width, height, descent, leading) = gc.get_full_text_extent(line)
File "C:\Python26\lib\site-packages\enable-3.3.2-py2.6-win32.egg\enthought\kiva\agg\agg.py", line 927, in get_full_text_extent
leading, descent, w, h = self.get_text_extent(text)
File "C:\Python26\lib\site-packages\enable-3.3.2-py2.6-win32.egg\enthought\kiva\agg\agg.py", line 913, in get_text_extent
text = handle_unicode(text)
File "C:\Python26\lib\site-packages\enable-3.3.2-py2.6-win32.egg\enthought\kiva\agg\agg.py", line 732, in handle_unicode
raise UnicodeError, "Error encoding text to latin1."
UnicodeError: Error encoding text to latin1.
....
2011年07月19日 星期二 14:43
这是因为Chaco图表上不支持汉字显示,目前没有办法。
Zeuux © 2024
京ICP备05028076号