Hi,
The "just" property for TextFields on Win32 doesn't seem to work,
giving attribute errors. This occurs both when passing a justification
value with the constructor, and when using the set_just method. Both
work fine on OS X. Alignment for Labels seems to work without
problems.
Windows setup is: WinXP on VMWare Fusion, PyGUI 2.3, Python 2.6.6,
pywin32-213 for Python 2.6.
Examples below.
Using set_just:
>>> from GUI import TextField
>>> f = TextField(text = "Foo")
GControl._calc_height: 1 lines of Font('Tahoma',16,[])
...line height = 16
...vertical padding = 5
GComponent.invalidate: <GUI.TextFields.TextField object at 0x00C912F0>
>>> f.set_just('right')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python26\lib\site-packages\GUI\Win32\TextFields.py", line
63, in set_just
self._win.ModifyFlags(win_just_mask, flags)
AttributeError: 'PyCEdit' object has no attribute 'ModifyFlags'
Passing a justificaiton value in with the constructor:
>>> g = TextField(text = "Bar", just = "right")
GControl._calc_height: 1 lines of Font('Tahoma',16,[])
...line height = 16
...vertical padding = 5
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python26\lib\site-packages\GUI\Win32\TextFields.py", line
49, in __init__
GTextField.__init__(self, _win = win, **kwds)
File "C:\Python26\lib\site-packages\GUI\Generic\GTextFields.py",
line 35, in __init__
Control.__init__(self, **kwds)
File "C:\Python26\lib\site-packages\GUI\Generic\GControls.py", line
28, in __init__
Component.__init__(self, **kwds)
File "C:\Python26\lib\site-packages\GUI\Win32\Components.py", line
78, in __init__
GComponent.__init__(self, **kwds)
File "C:\Python26\lib\site-packages\GUI\Generic\GComponents.py",
line 79, in __init__
Properties.__init__(self, **kwds)
File "C:\Python26\lib\site-packages\GUI\Generic\Properties.py", line
15, in __init__
self.set(**kw)
File "C:\Python26\lib\site-packages\GUI\Generic\Properties.py", line
27, in set
s(self, value)
File "C:\Python26\lib\site-packages\GUI\Generic\Properties.py", line
40, in <lambda>
lambda self, value: getattr(self, setter_name)(value),
File "C:\Python26\lib\site-packages\GUI\Win32\TextFields.py", line
63, in set_just
self._win.ModifyFlags(win_just_mask, flags)
AttributeError: 'PyCEdit' object has no attribute 'ModifyFlags'
Cheers,
Alex
_______________________________________________
Pygui mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pygui