1
1
import tkinter as tk
2
2
from tkinter import ttk
3
3
4
+
4
5
class PortfolioApp (tk .Tk ):
5
6
def __init__ (self ):
6
7
super ().__init__ ()
@@ -11,15 +12,18 @@ def __init__(self):
11
12
12
13
def create_widgets (self ):
13
14
# 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 ))
15
17
title_label .pack (pady = 10 )
16
18
17
19
# 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 )
19
22
projects_button .pack (pady = 5 )
20
23
21
24
# 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 )
23
27
more_info_button .pack (pady = 5 )
24
28
25
29
# Create a button to exit the app
@@ -32,14 +36,17 @@ def show_projects(self):
32
36
projects_window .geometry ("400x300" )
33
37
34
38
# 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 ))
36
41
projects_label .pack (pady = 10 )
37
42
38
43
# 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." )
40
46
project1_label .pack (pady = 5 )
41
47
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." )
43
50
project2_label .pack (pady = 5 )
44
51
45
52
def show_more_info (self ):
@@ -48,19 +55,24 @@ def show_more_info(self):
48
55
info_window .geometry ("400x300" )
49
56
50
57
# 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 ))
52
60
info_label .pack (pady = 10 )
53
61
54
62
# 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." )
56
65
experience_label .pack (pady = 5 )
57
66
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." )
59
69
skills_label .pack (pady = 5 )
60
70
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.)." )
62
73
contact_label .pack (pady = 5 )
63
74
75
+
64
76
if __name__ == "__main__" :
65
77
app = PortfolioApp ()
66
78
app .mainloop ()
0 commit comments