wxPython MCQ Questions & Answers
wxPython MCQs : This section focuses on "wxPython" of Python Library. These Multiple Choice Questions (MCQ) should be practiced to improve the wxPython skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. wxPython developed by?
A. Robin Dunn
B. Harri Pasanen
C. Guido van Rossum
D. Both A and B
View Answer
Ans : D
Explanation: Developed by Robin Dunn along with Harri Pasanen, wxPython is implemented as a Python extension module.
2. wxPython is a Python wrapper for wxWidgets.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, wxPython is a Python wrapper for wxWidgets (which is written in C++), a popular cross-platform GUI toolkit.
3. A ___________ window can contain any frame that is not a dialog or another frame.
A. wxModule
B. wxFrame
C. wxWidget
D. wxFormBuilder
View Answer
Ans : B
Explanation: wxFrame object is the most commonly employed top level window. It is derived from wxWindow class. A frame is a window whose size and position can be changed by the user. It has a title bar and control buttons.
4. Which of the following is true about wxFormBuilder?
A. wxFormBuilder is open source
B. wxFormBuilder is cross-platform
C. wxFormBuilder is can translate the wxWidget GUI design into C++, Python, PHP or XML format
D. All of the above
View Answer
Ans : D
Explanation: wxFormBuilder is an open source, cross-platform WYSIWYG GUI builder that can translate the wxWidget GUI design into C++, Python, PHP or XML format.
5. Which of the following is true about wx.Panel?
A. Class has a default constructor with no arguments
B. class object presents a control holding such read-only text
C. class is usually put inside a wxFrame object
D. None of the above
View Answer
Ans : C
Explanation: wx.Panel class is usually put inside a wxFrame object. This class is also inherited from wxWindow class.
6. A _________ displays a small labeled rectangular box.
A. wx.StaticText
B. wx.checkbox
C. wx.Frame
D. wx.Toolbar
View Answer
Ans : B
Explanation: A checkbox displays a small labeled rectangular box. When clicked, a checkmark appears inside the rectangle to indicate that a choice is made.
7. ___________ class object shows a vertical or horizontal bar, which graphically shows incrementing quantity.
A. wx.Slider
B. wx.MenuBar
C. Wx.Gauge
D. wx.CheckBox
View Answer
Ans : C
Explanation: Wx.Gauge class object shows a vertical or horizontal bar, which graphically shows incrementing quantity.
8. _______ method is inherited by all display objects from wx.EvtHandler class.
A. OnClick()
B. Event()
C. Load()
D. Bind()
View Answer
Ans : D
Explanation: self.b1.Bind(EVT_BUTTON, OnClick) : Bind() method is inherited by all display objects from wx.EvtHandler class. EVT_.BUTTON here is the binder, which associates button click event to OnClick() method.
9. Which of the following method Sets the button’s caption programmatically?
A. SetLabel
B. GetLabel
C. SetDefault
D. Default
View Answer
Ans : A
Explanation: SetLabel() : Sets the button’s caption programmatically
10. wxPython API contains wx.Slider class.
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A
Explanation: wxPython API contains wx.Slider class. It offers same functionality as that of Scrollbar. Slider offers a convenient way to handle dragging the handle by slider specific wx.EVT_SLIDER event binder
Discussion