Develop a GUIll (details given below) by Using wxPythonandTkinter, compare the code complexity of both and give your observations.
Use suitable components like text box, combo box, list, Radio Button, Check Box, Buttons, etc. to develop the GUI
Details of GUI: the GUI should accept the personal details of an Employee like Employee Name, DOB, Residential Address, Email, Mobile, Blood Group (A+, B+, O+, A-, B-, O-, etc.), Nature of Job (Permanent, Temporary, contractual, daily wage etc.), Diabetic (Yes, NO), Health Summary etc.
When creating a GUI for managing personal details of an employee, wxPython and Tkinter both provide robust ways to develop such interfaces in Python. Below is a comparative discussion of how both frameworks can be used to design this GUI and a comparison of their code complexity.
wxPython Code
import wx class EmployeeForm(wx.Frame): def __init__(self, parent, title): super().__init__(parent, title=title, size=(500, 400)) panel = wx.Panel(self) vbox = wx.BoxSizer(wx.VERTICAL) # Employee Name self.name_label = wx.StaticText(panel, label="Employee Name:") self.name_text = wx.TextCtrl(panel) vbox.Add(self.name_label, flag=wx.LEFT | wx.TOP, border=10) vbox.Add(self.name_text, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=10) # DOB self.dob_label = wx.StaticText(panel, label="Date of Birth:") self.dob_picker = wx.adv.DatePickerCtrl(panel) vbox.Add(self.dob_label, flag=wx.LEFT | wx.TOP, border=10) vbox.Add(self.dob_picker, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=10) # Address self.address_label = wx.StaticText(panel, label="Residential Address:") self.address_text = wx.TextCtrl(panel, style=wx.TE_MULTILINE) vbox.Add(self.address_label, flag=wx.LEFT | wx.TOP, border=10) vbox.Add(self.address_text, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=10) # Email self.email_label = wx.StaticText(panel, label="Email:") self.email_text = wx.TextCtrl(panel) vbox.Add(self.email_label, flag=wx.LEFT | wx.TOP, border=10) vbox.Add(self.email_text, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=10) # Mobile self.mobile_label = wx.StaticText(panel, label="Mobile:") self.mobile_text = wx.TextCtrl(panel) vbox.Add(self.mobile_label, flag=wx.LEFT | wx.TOP, border=10) vbox.Add(self.mobile_text, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=10) # Blood Group self.blood_group_label = wx.StaticText(panel, label="Blood Group:") self.blood_group_combo = wx.ComboBox(panel, choices=["A+", "B+", "O+", "A-", "B-", "O-"]) vbox.Add(self.blood_group_label, flag=wx.LEFT | wx.TOP, border=10) vbox.Add(self.blood_group_combo, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=10) # Nature of Job self.job_label = wx.StaticText(panel, label="Nature of Job:") self.job_combo = wx.ComboBox(panel, choices=["Permanent", "Temporary", "Contractual", "Daily Wage"]) vbox.Add(self.job_label, flag=wx.LEFT | wx.TOP, border=10) vbox.Add(self.job_combo, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=10) # Diabetic self.diabetic_label = wx.StaticText(panel, label="Diabetic:") self.diabetic_radio = wx.RadioBox(panel, choices=["Yes", "No"]) vbox.Add(self.diabetic_label, flag=wx.LEFT | wx.TOP, border=10) vbox.Add(self.diabetic_radio, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=10) # Health Summary self.health_summary_label = wx.StaticText(panel, label="Health Summary:") self.health_summary_text = wx.TextCtrl(panel, style=wx.TE_MULTILINE) vbox.Add(self.health_summary_label, flag=wx.LEFT | wx.TOP, border=10) vbox.Add(self.health_summary_text, flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=10) # Submit Button self.submit_button = wx.Button(panel, label="Submit") vbox.Add(self.submit_button, flag=wx.ALIGN_CENTER | wx.TOP, border=10) panel.SetSizer(vbox) self.Centre() self.Show() if __name__ == __________ __________ ____ _______ ________ _______ ______.
_________ __________ _______ _______ _________.
______ ____ _________ ______ __________ _______ ________.
________ ____ ____ ___ ________ _______ ___ _________ ______ ________ _______ _______.
______ ____ ______ ________ __________ _________ _______ ___.
_______ ______ ________ _______ ______.
_________ _______ _______ ____ _________ ________ ____.
_________ _____ ______ ________ _____.
_________ ___ ______ __________ _________ __________ ________ ___ __________.
________ __________ _______ ____ ______ __________.
___ __________ ____ _______ _______ _______ __________ _______.
_____ ______ ___ ___ ___ ___ _______ ______ _____ _________ ___.
____ __________ _______ ______ ________.
_____ ____ ________ __________ ____ _______.
___ ___ __________ _________ __________ _____ ________ ___ ______ ___ __________.
_____ _________ _________ ___ _________.
_____ _______ ____ _____ ________ _______ ___.
______ _____ __________ __________ ________ __________ _______ _________ __________ _____.
_____ _______ ______ _____ ____ ____ __________ _______.
__________ _________ ________ _________ ________ __________ ________ ____ _______ _______ ______.
_____ _________ ___ ___ ________ ______ ______ ___.
_________ ___ _________ _________ __________ __________ ________.
_______ ________ ___ __________ ___ ____ __________ ________ _________.
___ _____ __________ _______ _________ ________.
________ ______ ____ ______ _________ __________ _________ ____ _________.
___ ___ ______ ________ _____ ________ ___ _____ ___.
______ ___ __________ ________ _____ __________ __________ ___ __________ __________.
____ ________ _______ _________ __________ ___ ___ __________.
_________ _____ _________ ____ ___ ______ __________ ____.
_____ ________ _____ ____ ________ _____ _____ ________ ________ ___ ___.
__________ __________ _________ _________ _________.
_________ ________ ______ ____ ___ __________ ______.
___ ___ ________ __________ _________ __________ _____ _______ _________.
_____ ____ ______ _______ ________ _______ ___ ___ ___ ___.
_________ ________ _________ ________ ______ ______ _______ _________ ______ ________.
___ ___ _________ _________ __________ _________ ___.
__________ ______ _________ _______ ________ _______ _____ __________ ______.
____ ________ ________ _________ _____ ______ ____ ______ _____.
________ ________ _________ ______ _________ ________ __________ _________.
_____ _______ ___ ____ ____ _______ __________ __________ ____ _______ _______.
___ ________ __________ __________ ________ ______ _________ _________ _____ ________ _______.
_____ ________ _____ ______ _______ __________ ___ _________ ____ ________ _______ ____.
__________ _________ ______ ________ _____ _______ ______ ____ ______.
_____ ______ __________ ______ _____ _______ ____.
_____ ___ ___ _____ ___ _____ ________ ____ ________ ___ __________ _________.
__________ _________ _____ ___ _________.
___ _______ _______ _____ _________.
_________ _____ ______ _______ __________ _______ ________.
_____ ______ __________ ______ __________ _______.
____ _____ ________ ___ _________ _______ _________.
_____ __________ _____ _______ ________ ___ _____ ______ ________.
_______ ___ ___ _______ _______ ______ ____.
_______ __________ ____ ______ _________ _____ _____ _________.
_________ _______ ____ _________ ______ __________ ______ _______.
___ ________ ________ _____ _______ ______ _________ ____ _______ _____.
________ _____ __________ ___ _____ _______ ____ ________ _______ ____ _________ _________.
_________ _________ ______ __________ ______ _______ _________ ____ _____ _____.
_______ _____ _________ ____ ___ ________ __________ ___ ____.
____ _______ ___ ____ _______.
________ _____ ______ ______ ________ ________ _______.
__________ ___ ____ _____ __________ _________.
_____ ___ ___ ____ ________ _______ _________ ______.
_____ _________ ______ ___ ____ ____.
_______ _____ ___ _____ ________ ______ ___.
_____ ________ _______ _____ _____ _____ _______ __________ _________ ___ _____ _______.
_____ __________ _________ __________ ______ ____.
_____ ____ _________ ______ ______ ____ ______.
_______ ________ _______ ____ _________ __________ _____ ____ _________.
_________ ______ ___ _________ ____ ___ _____.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
✓ Unlock up to 60% of the answer
✓ No payment required