Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
enable / examples / demo / enable / constraints_demo.enaml
Size: Mime:
# (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at http://www.enthought.com/licenses/BSD.txt
#
# Thanks for using Enthought open source!
""" Implements the constraints_demo in Enaml
"""
from enaml.layout.api import align, hbox
from enaml.widgets.api import Window, Container, Html


enamldef Main(Window):
    Container:
        constraints = [
            hbox(one, two, three, four),
            align('width', one, two, three, four),
        ]
        Html:
            id: one
            source = '<html><body bgcolor="#FF0000"></body></html>'
        Html:
            id: two
            source = '<html><body bgcolor="#00FF00"></body></html>'
        Html:
            id: three
            source = '<html><body bgcolor="#0000FF"></body></html>'
        Html:
            id: four
            source = '<html><body bgcolor="#000000"></body></html>'