Skip to content
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

Displaying images in gui #46

Open
hujosh opened this issue Apr 21, 2016 · 3 comments
Open

Displaying images in gui #46

hujosh opened this issue Apr 21, 2016 · 3 comments

Comments

@hujosh
Copy link

hujosh commented Apr 21, 2016

I have poked around a little in the views.py. I worked out how to add a new tab that allows users to select which browswer they would like the tests to run in. I couldn't figure out how to get an image to display in the gui, however. If you could point me in the right direction, i would appreciate it. Btw, i'm not sure if this is the right place to post this because this isn't a bug.

@gopar
Copy link
Contributor

gopar commented Apr 21, 2016

@hujosh Hey! Have you tried following this?
http://effbot.org/tkinterbook/photoimage.htm

Also, it looks like Tkinter requires for you to hold a reference to the image. Here's a detailed and example to help:
http://effbot.org/pyfaq/why-do-my-tkinter-images-not-appear.htm

@freakboy3742
Copy link
Member

It's not clear to me exactly why this requires an image view - or why another tab is required. If you're looking to configure the browser to use so it can be passed in as an option, I would have thought a menu option would be all you need. What's the role of the image?

@hujosh
Copy link
Author

hujosh commented Apr 22, 2016

I only mentioned the browser thing so that you knew i was somewhat familiar with the views.py code. Maybe i used the wrong terminology to describe it: i meant that i put another "drown down menu' among the set that comes with cricket by default -- the set {File ,Test, BeeWare, Help}.

I have now worked out how to do images. I just put a "view screenshot" button in the details frame that is "DISABLED" until a testcase has been run. I don't display the image in the Cricket GUI. Instead i use

    image.show(),

which opens the paint program on windows 10 with the image i want to be showed showed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants