Skip to content

Raster image support in Canvas #955

@werdnahull

Description

@werdnahull

Expected Behavior

The documentation lists add(*children) as a method of the Canvas widget. I expect to be able to add other child widgets to the Canvas widget.

Current Behavior

I am attempting to add an ImageView as a child of the Canvas widget, but receive "ValueError: Cannot add children"

Steps to reproduce

  1. Create canvas widget
    canvas = toga.Canvas()

  2. Create another widget (ie ImageView)
    image = toga.ImageView()

  3. Attempt to add ImageView as child of Canvas
    canvas.add(image)

Your Environment

  • Python Version (list the specific version number)
    3.7.7

  • Operating System and Version (select from the following and list the specific version number; if your OS is not listed, list that as well)

    • Windows - version: 10 build 1903
  • Toga Version (list the specific version number or git hash)
    0.3.0.dev21

  • Toga Target (the type of app you are trying to generate)

    • android
    • cocoa
    • django
    • gtk
    • iOS
    • tvOS
    • watchOS
    • winforms
    • win32
    • Other (please specify)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features, or improvements to existing features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions