11import tkinter as tk
22from tkinter import ttk
33
4+
45class PortfolioApp (tk .Tk ):
56 def __init__ (self ):
67 super ().__init__ ()
@@ -11,15 +12,18 @@ def __init__(self):
1112
1213 def create_widgets (self ):
1314 # Create a label for the title
14- title_label = ttk .Label (self , text = "Welcome to My Portfolio" , font = ("Helvetica" , 16 ))
15+ title_label = ttk .Label (
16+ self , text = "Welcome to My Portfolio" , font = ("Helvetica" , 16 ))
1517 title_label .pack (pady = 10 )
1618
1719 # Create a button to go to the projects page
18- projects_button = ttk .Button (self , text = "View Projects" , command = self .show_projects )
20+ projects_button = ttk .Button (
21+ self , text = "View Projects" , command = self .show_projects )
1922 projects_button .pack (pady = 5 )
2023
2124 # Create a button to show more information
22- more_info_button = ttk .Button (self , text = "More Information" , command = self .show_more_info )
25+ more_info_button = ttk .Button (
26+ self , text = "More Information" , command = self .show_more_info )
2327 more_info_button .pack (pady = 5 )
2428
2529 # Create a button to exit the app
@@ -32,14 +36,17 @@ def show_projects(self):
3236 projects_window .geometry ("400x300" )
3337
3438 # Create a label for the projects page
35- projects_label = ttk .Label (projects_window , text = "List of Projects" , font = ("Helvetica" , 16 ))
39+ projects_label = ttk .Label (
40+ projects_window , text = "List of Projects" , font = ("Helvetica" , 16 ))
3641 projects_label .pack (pady = 10 )
3742
3843 # Create project descriptions (you can add more as needed)
39- project1_label = ttk .Label (projects_window , text = "Project 1: Description of project 1." )
44+ project1_label = ttk .Label (
45+ projects_window , text = "Project 1: Description of project 1." )
4046 project1_label .pack (pady = 5 )
4147
42- project2_label = ttk .Label (projects_window , text = "Project 2: Description of project 2." )
48+ project2_label = ttk .Label (
49+ projects_window , text = "Project 2: Description of project 2." )
4350 project2_label .pack (pady = 5 )
4451
4552 def show_more_info (self ):
@@ -48,19 +55,24 @@ def show_more_info(self):
4855 info_window .geometry ("400x300" )
4956
5057 # Create labels for more information
51- info_label = ttk .Label (info_window , text = "Experience, Skills, and Contact Details" , font = ("Helvetica" , 16 ))
58+ info_label = ttk .Label (
59+ info_window , text = "Experience, Skills, and Contact Details" , font = ("Helvetica" , 16 ))
5260 info_label .pack (pady = 10 )
5361
5462 # Add more labels here for additional information about yourself
55- experience_label = ttk .Label (info_window , text = "Experience: Describe your work experience here." )
63+ experience_label = ttk .Label (
64+ info_window , text = "Experience: Describe your work experience here." )
5665 experience_label .pack (pady = 5 )
5766
58- skills_label = ttk .Label (info_window , text = "Skills: List your skills here." )
67+ skills_label = ttk .Label (
68+ info_window , text = "Skills: List your skills here." )
5969 skills_label .pack (pady = 5 )
6070
61- contact_label = ttk .Label (info_window , text = "Contact: Your contact details (email, phone, etc.)." )
71+ contact_label = ttk .Label (
72+ info_window , text = "Contact: Your contact details (email, phone, etc.)." )
6273 contact_label .pack (pady = 5 )
6374
75+
6476if __name__ == "__main__" :
6577 app = PortfolioApp ()
6678 app .mainloop ()
0 commit comments