Questions tagged [enaml]

Declarative User Interfaces for Python

Enaml is a Python library for creating professional quality user interfaces with minimal effort. Enaml combines a domain specific declarative language with a constraints based layout system to allow users to easily define rich UIs with complex and flexible layouts. Enaml applications can transparently run on multiple backends (Qt and Wx) and on multiple operating systems (Windows, OSX, Linux).

The project source code is on github: https://github.com/nucleic/enaml

The docs are also on github: http://nucleic.github.io/enaml/docs/

45 questions
1
vote
1 answer

What purpose does passing Atom do when creating a python class for use with enaml?

I'm trying to code my first GUI with Enaml and I can't figure out the reference to Atom when they're creating a class. I know it's an IDE (I'm using PyCharm) but I'm not sure if that's what it's even referencing. I can't find seem to find any…
acepapa
  • 13
  • 5
1
vote
2 answers

Why won't my Enaml ImageView scale down?

Here is a simple Enaml file to display a single image - an 800x1210 pixel image. from enaml.widgets.api import Window, Container, ImageView from enaml.image import Image enamldef ImageViewResizeWindow(Window): Container: ImageView: …
Oddthinking
  • 24,359
  • 19
  • 83
  • 121
1
vote
1 answer

Embedding pyqtgraph in enaml... how?

I'm quite new to pyqt and pyqtgraph so my apology if I'm missing basic things. I have python program that acquires and plots data, where GUI is implemented by enaml. However the speed of MPL Canvas (matplotlib) was intolerably slow for realtime…
Xnei
  • 11
  • 2
1
vote
0 answers

Qt window partially blank after closing popup window

We're having an issue in a Qt app where part of the window is occasionally blank/white after closing a popup window that was in front. Anecdotally, the blank section is always in diagonal stripes from the top of the window. The main window and the…
jmilloy
  • 7,875
  • 11
  • 53
  • 86
1
vote
1 answer

Capture window focus in event in Enaml

Can I execute code when a window comes into focus (becomes the active window, e.g. when the window above it is closed)? I hoped windows would just have focus event or attribute, but that doesn't seem to be the case. There are focus events in Qt. If…
jmilloy
  • 7,875
  • 11
  • 53
  • 86
1
vote
1 answer

Enaml Looper horizontal layout

By default the below code will lay out each GroupBox object vertically stacked (one underneath the other). enamldef Main(Window): attr model Container: constraints = [ hbox(items) ] Container: items: Looper: …
Rikla
  • 13
  • 2
1
vote
0 answers

Traits-Enaml: Observing trait changes in Atom model

I am writing an application using the Traits-Enaml library. Most of my application is written in Atom, with the exception of some classes that need to display Chaco plots. These classes inherit from HasTraits. Example: def SomeClass(HasTraits): …
uigui
  • 11
  • 2
1
vote
1 answer

Resizing MainWindow, HGroup doesn't expand verticallly

The following simple layout doesn't expand vertically after resizing, only vertically. I already played around with hug_width, hug_height and partners without success. I also tried using constraints with hbox What i am missing? from…
tillsten
  • 14,491
  • 5
  • 32
  • 41
1
vote
0 answers

Enaml 'hello world ' fails to run in Canopy editor

Trying to run of the shelf Hello World in Canopy editor - got the error bellow In [1]: %run…
1
vote
3 answers

How do I import show_simple_view from enaml.stdlib.sessions?

I'm trying to teach myself Enaml but none of the tutorial code works for me. http://docs.enthought.com/enaml/instructional/tut_hello_world.html Whenever I execute the Python code, it stops at line 8: from enaml.stdlib.sessions import…
memery
  • 37
  • 5
1
vote
1 answer

How to make a custom container?

I want to make reusable Container with a title in the like in the banner example. (So it is like a custom GroupBox). So every element i add to the class should be added to the classes subcontainer, not to itself. See the code below, i marked the…
tillsten
  • 14,491
  • 5
  • 32
  • 41
1
vote
1 answer

Enaml slider arrow keys not working

I'm using enaml and trying to get a slider that can also be controlled with the arrow keys. I've used the slide example from the gallery (which doesn't work out-of-the-box, and gives a math domain error, but can be fixed by removing the log).…
tiago
  • 22,602
  • 12
  • 72
  • 88
1
vote
1 answer

How to use ScatterInspector and ScatterInspectorOverlay?

I would like to use the chaco tools ScatterInspector and/or ScatterInspectorOverlay with enaml. I've set up a very simple controller and view (source below) but cannot determine how to proceed. I have tried unsuccessfully to follow the minimal and…
JefferyRPrice
  • 895
  • 5
  • 17
0
votes
1 answer

How PySide6 paintEvent function for a PushButton works?

A long time ago, I wanted to make a logo appear on top of the text in a QPushButton stacked on top of each other, but I couldn't find anyway I read some stylesheets (couldn't find a single doc to read it all about all styles I can apply to a…
AARMN
  • 13
  • 3
0
votes
1 answer

How to trigger a function in Enaml while having a plot figure displaying?

I am trying to print a string to the terminal while displaying a plot figure on my enaml gui and it doesn't seem to respond. Listed below are my two scripts: main_view.enaml from enaml.widgets.api import Window, Container, MPLCanvas, Label,…