Questions tagged [traitsui]

traitsui is a data-driven framework developed by Enthought for building user interfaces on top of traits in python.

Traitsui is a data-driven framework developed by Enthought for building user interfaces on top of traits in Python. The details of layout and organization are mostly abstracted from the programmer, although an API is exposed to manage some of the details.

In traitsui, statically-typed classes (using traits) can automatically generate interactive interfaces for manipulation. Object-oriented principles generally apply -- by specifying a Manager(HasTraits) class with traits such as salary=Int and job_title=String, traitsui can automatically generate a window to edit these attributes.

traitsui makes use of different widget-drawing toolkits, notably qt4 and Wx by means of the pyside and wxpython bindings to those frameworks. Thus the UIs developed have the look and feel of the native OS.

See the traitsui user manual for more: http://docs.enthought.com/traitsui/traitsui_user_manual/index.html

167 questions
0
votes
1 answer

TabularAdapter Editor issue

I've run into an issue with the TabularAdapter in the TraitsUI package... I've been trying to figure this out on my own for much too long now, so I wanted to ask the experts here for some friendly advise :) I'm going to add a piece of my program…
Steve76063
  • 317
  • 2
  • 10
0
votes
1 answer

Nested HasTraits objects , how to Initialise properly

I am trying to create a HasTraits objects which contains several other different instance of another HasTraits objects. However, I always seem to hit problems when I initialise my many HasTraits objects in the master object. I've produced a simple…
user2175850
  • 193
  • 2
  • 13
0
votes
1 answer

adding/changing 'text' to an item in a group

I'm designing a UI with Enthought's TraitsUI, and I can't figure out how to get done what I want... Here's what I want: I have Items() in the view that I want to display as either English or SI units. I can change the value in the 'edit' box based…
Steve76063
  • 317
  • 2
  • 10
0
votes
2 answers

save_file() not giving 'already exists' messagebox

I'm trying to use the save_file() from traitsui.file_dialog, and I'm having a problem...the really odd thing is that if I run my code in Visual Studio (using PTVS), it works just fine! Here's the problem as I see it... When I use the dialog created…
Steve76063
  • 317
  • 2
  • 10
0
votes
1 answer

Chaco - Getting multiple data series to use the same axes and maps

I am trying to plot several collections of data on a single plot. Each dataset can be represented as an x-series (index) and several y-series (values). The ranges of x and y data series may be different in each data set. I want to have several of…
user2175850
  • 193
  • 2
  • 13
0
votes
1 answer

Plotting multiple time series using VPlotContainers in Chaco. Limit to the number of VPlotContainer objects you can use

I wish to plot multiple time series data stored in a NumPy array, in the same plot but with each time series offset, so effectively it has it's own Y axis. I figured the best way to do this may be to put each series in a separate VPlotContainer,…
Philip Lawrence
  • 215
  • 2
  • 8
0
votes
1 answer

Python Chaco Plotting - Draw a text label on plot using PlotLabel

I am trying to add several text labels to my Chaco Polygon Plot. My Polygon Plot works fine, however, I can't work out how to get the text labels to appear at custom locations on the plot. I think I need to use the chaco.plot_label.PlotLabel object.…
user2175850
  • 193
  • 2
  • 13
0
votes
3 answers

Trouble with CArray initialization and assignment

I can't figure out how to use the CArray trait. Why does this class from traits.api import HasTraits, CArray, Float,Int import numpy as np class Coordinate3D(HasTraits): coordinate = CArray(Float(), shape=(1,3) ) def…
Sven
  • 985
  • 1
  • 11
  • 27
0
votes
1 answer

Issue with configure_traits when using Enthought Canopy

I was following the tutorial "Writing a graphical applications for scientific programming using TraitsUI http://code.enthought.com/projects/traits/docs/html/tutorials/traits_ui_scientific_app.html and tested the following code snippet: from…
Geophys
  • 21
  • 4
0
votes
1 answer

TableEditor fails to update correct range

I came across the behavior that RangeEditor does not work properly inside a TableEditor. from traits.api import * from traitsui.api import * class TableItem(HasTraits): r=Range(1,6) class Table(HasTraits): t=List(Instance(TableItem)) …
aestrivex
  • 5,170
  • 2
  • 27
  • 44
0
votes
2 answers

access value of a trait such as Directory

I am doing simple file I/O. I have a Directory trait SaveDir and a File trait SaveFile. How to i access the directory path entered in the GUI, or the default? e.g., i would like to print it out, as in the following example. Do i use get_value, e.g.,…
DanG
  • 306
  • 7
  • 15
0
votes
1 answer

Using CheckListEditor with something other than List(Str)

Are CheckListEditors able to handle lists of objects that are not strings but implement __str__ and __repr__?
aestrivex
  • 5,170
  • 2
  • 27
  • 44
0
votes
1 answer

how does the traitsui object model work

Can someone explain why this code crashes? What I think should happen is that it should not crash if it is using fully qualified trait names, which it is in this case. from traits.api import * from traitsui.api import * class Struct(HasTraits):…
aestrivex
  • 5,170
  • 2
  • 27
  • 44
0
votes
1 answer

Error envisage traits when creating a .exe with py2exe

I'm trying to create a .exe with py2exe. My application uses envisage and traits packages. When I run the entry point script using the python interpreter everything is OK, but when I generate the .exe and try to executes the resulting .exe file it…
El Marce
  • 3,144
  • 1
  • 26
  • 40
0
votes
1 answer

Drawing solid box of color in traits GUI

I wonder how I might create a solid box of color for my python traits GUI which I can change the color of by, say, clicking on different buttons. I've found the ColorEditor editor, so I can achieve solid boxes of color by defining a trait: …
RobMSN
  • 87
  • 1
  • 6