Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
School project
#3
Thanks for reply.

Som nevnt er jeg ny til koding. For dette prosjektet har jeg i hovedsak brukt Sublime Text 3 og tkinter.
I do not have much. Just breadcrumbs that I have tried to put together, without success. I have tried different features but not found the right one. I know what I want the function to be.

I'm not looking for a conclusion. Just set in the right direction.

I add what I have, but I know it's wrong and it does not work.

Sincerely, Jan.


# Importerer tkinter. Dette følger med, er innebygd i Python
from tkinter import *
from PIL import ImageTk,Image
from tkinter import filedialog

# Dette må stå først
root = Tk()
# Endre overskriften på boksen
root.title("BIMBARIANS Autorun")
root.iconbitmap('C:/Users/jan/Desktop/SolibriAutorun/Ikon/BIMBARIANS.ico')
root.geometry("400x400")

def button_open1():
	global my_file
	root.filename = filedialog.askopenfilename(initialdir="C:/Users/jan/Desktop/SolibriAutorun", title="Select A File", filetypes=(("IFC files", "*.ifc"),("all files", "*.*")))
	my_label = Label(root, text=root.filename).pack()
	#my_image = ImageTk.PhotoImage(Image.open(root.filename))
	#my_image_label = Label(image=my_image).pack()

button_1 = Button(root, text="Add IFC", padx=59, pady=20, command=button_open1)
button_2 = Button(root, text="Add ruleset", padx=46, pady=20, command=open)
button_3 = Button(root, text="Add classification", padx=33, pady=20, command=open)
button_4 = Button(root, text="Run Solibri Autorun", padx=38, pady=20, command=open) 

button_1.grid(row=1, column=0)
button_2.grid(row=2, column=0)
button_3.grid(row=3, column=0)
button_4.grid(row=4, column=0)



mainloop()
# Når man lukker vinduet, slutter man loopen
Larz60+ write Jan-22-2021, 05:08 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.

Fixed for you this time. Please use bbcode tags on future posts.
Reply


Messages In This Thread
School project - by janivar91 - Jan-21-2021, 03:29 PM
RE: School project - by Larz60+ - Jan-21-2021, 07:51 PM
RE: School project - by janivar91 - Jan-22-2021, 12:02 PM
RE: School project - by KonohaHokage - Jan-23-2021, 06:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  my python project for school vavervirus 2 713 Oct-12-2023, 03:28 AM
Last Post: buran
Shocked School project -- need help with it it says syntax error XPGKNIGHT 6 3,407 Aug-11-2022, 08:43 PM
Last Post: deanhystad
  Python School Project andreas30298 2 2,193 Nov-12-2020, 09:58 AM
Last Post: Axel_Erfurt
  I need help for a school project IndyNeerhoff 1 2,139 Sep-28-2019, 08:28 PM
Last Post: Gribouillis
  [Tkinter] Tkinter project school Kersow 2 2,528 Apr-08-2019, 08:45 PM
Last Post: Larz60+
  card dealer school project kalle1234 5 12,450 Jan-05-2019, 09:21 PM
Last Post: ichabod801
  Small game (school project) Ganesh 7 5,729 Nov-08-2017, 09:04 PM
Last Post: Ganesh

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020