Deck 12: Using Controls
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/40
Play
Full screen (f)
Deck 12: Using Controls
1
When you size a ListBox so that all the items cannot be displayed at the same time, a scroll bar is provided automatically on the side.
True
2
What object is similar to a ListBox but with check boxes appearing to the left of each item?
A) CheckBox
B) ButtonBox
C) ComboBox
D) CheckedListBox
A) CheckBox
B) ButtonBox
C) ComboBox
D) CheckedListBox
D
3
What character can be placed before a letter in the Text property value of a ButtonBase object to make the letter function as an access key?
A) &
B) %
C) $
D) #
A) &
B) %
C) $
D) #
A
4
A LinkLabel is similar to a Label in that it is a parent of Label.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
5
When designing a Form, what design feature facilitated by the IDE will you typically utilize instead of typing code statements?
A) class automatic generation
B) drag-and-drop code generation
C) button serialization
D) object instantiation
A) class automatic generation
B) drag-and-drop code generation
C) button serialization
D) object instantiation
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
6
ListBox, ComboBox, and CheckedListBox objects all allow users to select choices from a list.These three classes descend from what parent class?
A) ListBase
B) ListControl
C) BaseList
D) List
A) ListBase
B) ListControl
C) BaseList
D) List
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
7
What class provides the definitions for GUI objects?
A) Control
B) Object
C) Widget
D) Gadget
A) Control
B) Object
C) Widget
D) Gadget
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
8
What can you use to provide the capability to link a user of your program to other sources, such as Web pages or files?
A) Label
B) FileLabel
C) ResourceLabel
D) LinkLabel
A) Label
B) FileLabel
C) ResourceLabel
D) LinkLabel
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
9
What Control allows you to retrieve date information?
A) Calendar
B) MonthCalendar
C) DateCalendar
D) CalendarPicker
A) Calendar
B) MonthCalendar
C) DateCalendar
D) CalendarPicker
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
10
Each Control has more than 80 public properties.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
11
What is similar to a ListBox, except that it displays an additional editing field to allow the user to select from the list or to enter new text?
A) ComboBox
B) CheckBox
C) CheckedListBox
D) ComboListBox
A) ComboBox
B) CheckBox
C) CheckedListBox
D) ComboListBox
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
12
C# allows you to create custom colors.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
13
What type of object is a GUI widget the user can click to select an option, and allows for any number of these objects to be selected at the same time?
A) ListBox
B) RadioButton
C) CheckBox
D) CheckedListBox
A) ListBox
B) RadioButton
C) CheckBox
D) CheckedListBox
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
14
What object can you instantiate on a remote computer so that you can manipulate a reference to the object rather than a local copy of the object?
A) ByRefObject
B) RemoteRefObject
C) RemoteObject
D) MarshalByRefObject
A) ByRefObject
B) RemoteRefObject
C) RemoteObject
D) MarshalByRefObject
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
15
What Control displays a month calendar when the down arrow is selected?
A) MonthCalendar
B) CalendarPicker
C) DateTimePicker
D) DatePicker
A) MonthCalendar
B) CalendarPicker
C) DateTimePicker
D) DatePicker
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
16
What ListBox property with a Boolean value allows you to configure whether or not to display items in columns instead of a straight vertical list?
A) SingleColumn
B) MoreColumn
C) OneColumn
D) MultiColumn
A) SingleColumn
B) MoreColumn
C) OneColumn
D) MultiColumn
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
17
What method is shared by CheckBox and RadioButton objects and is called when the object is clicked by the user?
A) Changed()
B) ClickedChanged()
C) CheckedChanged()
D) ValueChanged()
A) Changed()
B) ClickedChanged()
C) CheckedChanged()
D) ValueChanged()
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
18
The default text color for a LinkLabel is purple.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
19
What class do you utilize to change the appearance of printed text on your Forms?
A) Text
B) ForeText
C) Font
D) FontText
A) Text
B) ForeText
C) Font
D) FontText
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
20
What type of GUI widget object allows the user to click to select an option, but only allows for one within a given group to be selected at a time?
A) CheckButton
B) RadioButton
C) ListBox
D) RadioCheckedButton
A) CheckButton
B) RadioButton
C) ListBox
D) RadioCheckedButton
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
21
What are some of the commonly used CheckBox and RadioButton properties, and the default event for which a method shell is generated for these classes in the IDE? If you wanted a user to select which pizza toppings he or she wanted from a group of possible toppings, which Control would you use and why?
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
22
SelectionStart and SelectionEnd are properties of the MonthCalendar class.What methods can be applied to these properties to control the display of a date? What other factors influence the format in which dates are displayed?
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
23
What public Control property can be used to determine whether a control or one of its child controls currently has the input focus?
A) IsFocused
B) ContainsFocus
C) DetectFocus
D) GetFocus
A) IsFocused
B) ContainsFocus
C) DetectFocus
D) GetFocus
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
24
What are some of the commonly used LinkLabel properties, and what is the default event generated when the link is clicked by a user?
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
25
How would you declare a named instance of a Font class, and what arguments can be used within the constructor? Show the declaration for a font named fancyFont that is size 24, bold, underlined, and Helvetica.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
26
In a MenuStrip, placing what character in front of a unique letter allows the user to press Alt and then the given letter to activate the menu choice as an alternative to clicking it with the mouse?
A) %
B) $
C) &
D) >
A) %
B) $
C) &
D) >
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
27
When filling in the items in a MenuStrip control, double-clicking an entry automatically generates what type of method?
A) Change()
B) SetSelected()
C) Click()
D) SelectedIndexChanged()
A) Change()
B) SetSelected()
C) Click()
D) SelectedIndexChanged()
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
28
Where do automatically generated statements that set the properties of the labels, buttons, and forms end up?
A) Within the InitializeComponent() method.
B) Within the Property class in the Designer.cs file for the form.
C) In the Form's class declaration.
D) In the Click() method for the object involved.
A) Within the InitializeComponent() method.
B) Within the Property class in the Designer.cs file for the form.
C) In the Form's class declaration.
D) In the Click() method for the object involved.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
29
When designing a MenuStrip control, the programmer should follow conventional menu order.As an example, where should the Help option be located on the main menu?
A) on the far-left side
B) in the File submenu
C) in the Preferences submenu
D) on the far-right side
A) on the far-left side
B) in the File submenu
C) in the Preferences submenu
D) on the far-right side
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
30
What is a secondary window that takes control of a program known as?
A) modal window
B) popup box
C) message interrupter
D) focus grabber
A) modal window
B) popup box
C) message interrupter
D) focus grabber
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
31
Explain the selection options that can be controlled by setting the SelectionMode property of a ListBox.
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
32
What are some of the methods that you can use with the SelectionStart and SelectionEnd properties of MonthCalendar to calculate new dates? For example, if you wanted to calculate the date of an event that will occur 10 days from the SelectionStart date, what MonthCalendar method could you use?
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
33
What property for a MonthCalendar object allows you to specify the last day that can be selected?
A) LastDate
B) EndDate
C) MaxDate
D) SelectionRange
A) LastDate
B) EndDate
C) MaxDate
D) SelectionRange
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
34
When you create a Form in the Visual Studio IDE, the IDE automatically generates code to support the Form and any Controls that you place on the Form.What do you know about the Form under development given the following snippet of code generated by the IDE?
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.okButton = new System Windows.Forms.Button();
...
}
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.okButton = new System Windows.Forms.Button();
...
}
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
35
What are some of the commonly used PictureBox properties and the default event for a PictureBox?
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
36
What property can you set in order to attach a Control to the side of a container so that the Control stretches when the container's size is adjusted?
A) Anchor
B) Dock
C) Padding
D) Filling
A) Anchor
B) Dock
C) Padding
D) Filling
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
37
When you drag multiple Controls onto a Form, what appears to help you align new Controls with others already in place?
A) alignment dots
B) blue dotted lines
C) blue grip angles
D) blue snap lines
A) alignment dots
B) blue dotted lines
C) blue grip angles
D) blue snap lines
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
38
When working with a Form in the IDE, how do you place new Controls on the Form, and how can you adjust them precisely to align with existing Controls?
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
39
What property can be configured to cause a Control to remain at a fixed distance from the side of a container when the user resizes it?
A) Dock
B) Padding
C) Anchor
D) Filling
A) Dock
B) Padding
C) Anchor
D) Filling
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck
40
What are the similarities and differences between using a GroupBox and using a Panel to group related Controls on a Form?
Unlock Deck
Unlock for access to all 40 flashcards in this deck.
Unlock Deck
k this deck