Comments (3)
Get the same exception from examples/demo/Application/Python_source_browser.py
from traitsui.
In this snippet from traitsui/wx/tabular_editor.py (lines 134-136),
font = editor.adapter.get_font( object, name, row )
if font is not None:
attr.SetFont( font )
the adaper's get_font() method is returning the string "Courier 10", but the method attr.SetFont() expects a wx Font object. The example works if the line
font = 'Courier 10'
is changed to
font = Font('Courier 10')
I just pushed this change, and a similar change for Python_source_browser.py, so these examples should now work.
However, I think the TabularAdapter and/or backend-dependent editor should handle a string, since a Font trait is supposed to be able to handle being assigned a value such as "Courier 10", and the TabularAdapter knows that the special attribute called 'font' should be a Font trait.
from traitsui.
closing as I can't reproduce this at the moment.
from traitsui.
Related Issues (20)
- Update etstool to cover versions supported by EDM
- Refactor TreeEditor context menu code
- TreeEditor causes a segmentation fault during a drag event HOT 1
- Deprecation warnings regarding allowing None for "Datetime" traits
- Use standard Pyface/TraitsUI `Menu` objects for `TableEditor` extra menus
- CI: Qt and wrappers now in LGPL/GPL EDM repos
- Update CI for Ubuntu 22.04 HOT 1
- Update Wx/Ubuntu version in CI
- Update Qt requirements action for ubuntu-22.04
- Deleting objects at Shiboken-level in PySide6/MacOS causes segfault
- Font selection not working for PySide6/EDM builds HOT 1
- Occasional test failure in `TestProcessEventsRepeated`
- Bug: Tree editor does not update in the UI HOT 5
- `ImageEditor` test segfaults on MacOS
- In DatetimeEditor, the dual role of "minimum_datetime" (default value _and_ enforced minimum) is limiting
- Use "exec()" instead of "exec_()" with PySide6
- 'InstanceFactoryChoice' object has no attribute 'object'
- CodeEditor highlighting broken with wxPython
- current selected tab issue
- Verify all examples work with Python 3.11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traitsui.