New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containers in ToggleFrame break it #176

Closed
jarvisteach opened this Issue Jun 2, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@jarvisteach
Owner

jarvisteach commented Jun 2, 2017

If you put a DatePicker, or start a container, inside a ToggleFrame, it breaks.

The layout is skewed, and the Toggle function doesn't work properly.

from appJar import gui

app=gui()
app.startToggleFrame("Birthday")
app.addDatePicker("dp")
app.stopToggleFrame()
app.go()

@jarvisteach jarvisteach added the bug label Jun 2, 2017

jarvisteach added a commit that referenced this issue Jun 2, 2017

@jarvisteach jarvisteach added this to the 0.08 milestone Jun 11, 2017

@jarvisteach

This comment has been minimized.

Show comment
Hide comment
@jarvisteach

jarvisteach Jun 11, 2017

Owner

There is a more general issue around container creation.

When creating any container, in a container that isn't its own root we get problems.

In other words, if we assume containerStack[-1]['container'] is the widget we need to add to, we will get issues. ToggleFrame for example, is a Frame, but it contains a titleFrame and a subFrame, when we add widgets to a ToggleFrame they should be added to the subFrame.

This has been dealt with when placing widgets. __positionWidget() calls getContainer(), which gives back the right widget to position items in.

This same method should be used when creating containers.

Owner

jarvisteach commented Jun 11, 2017

There is a more general issue around container creation.

When creating any container, in a container that isn't its own root we get problems.

In other words, if we assume containerStack[-1]['container'] is the widget we need to add to, we will get issues. ToggleFrame for example, is a Frame, but it contains a titleFrame and a subFrame, when we add widgets to a ToggleFrame they should be added to the subFrame.

This has been dealt with when placing widgets. __positionWidget() calls getContainer(), which gives back the right widget to position items in.

This same method should be used when creating containers.

@jarvisteach jarvisteach modified the milestones: 0.07, 0.08 Jun 11, 2017

jarvisteach added a commit that referenced this issue Jun 11, 2017

DnD (#101)
Lots of new code, mostly to support Internal DnD (#102)
* New classes for a base canvas (CanvasDnD) to go under all widgets
* Both main window & subWindows now have a CanvasDnD
* New classes for a DraggableWidget & TrashBin widget
* New functions to register internal DnD
* Renaming to ExternalDnD import and wrappers

Implemented new after functions (#180)
* New functions to provide wrappers for after, etc

Fixed issue with containers in containers (#176)
* starting containers now use `getContainer()` instead of accessing
`containerStack` directly

Updated documentation for events & change-log

New test code for DnD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment