Which of the following statements will retrieve the text of a Label called “lblFirstName” and place it in a string variable called “str”?
string str = lblFirstName.Selection();
string str = lblFirstName.Text;
string str = lblFirstName.getText();
string str = lblFirstName.SelectedItem;
Often, multiple _____ objects are placed together on a Panel or _____ control. The user can only select one of them.
CheckBox, TextBox
ListBox, GroupBox
RadioButton, GroupBox
TextBox, ListBox
When the user of your fast-food ordering GUI selects the “checkBoxBurger” CheckBox, the string “Burger” should appear in the “listBoxOrder” ListBox. To implement this functionality, write _____ in the ckBoxBurger_CheckedChanged() event handler.
if
(ckBoxBurger.Checked == true)
{
listBoxOrder.Add(“Burger”);
}
if (ckBoxBurger.Checked() == true)
{
listBoxOrder.AddItem(“Burger”);
}
if (ckBoxBurger.Checked == true)
{
listBoxOrder.Item.Add(“Burger”);
}
if (ckBoxBurger.Checked == true)
{
listBoxOrder.AddItem(“Burger”);
}
A(n) _____ application calls on the operating system to perform input/output functions, whereas a(n) _____ application reacts to event notifications from the operating system.
console, Windows
GUI, Windows
Windows, console
Windows, GUI
Because _____ inherit members from the Control class, they both have the methods Show() and Hide().
Buttons and Events
TextBoxes and Events
RadioButtons and Forms
ListBoxes and ComboBoxes
Although a _____ usually accepts text input from the user, it can also be used to display text.
ComboBox
Label
MessageBox
TextBox
The first time a programmer double-clicks on a Button object in Design Mode, the Button’s default event handler method _____ is added to the code.
Click()
Clicked()
Double_Click()
Double_Clicked()
In Design Mode, put words next to a CheckBox by modifying _____ property in the Properties Window.
Label
Font
Name
Text
Type _____ to append “New Year’s Day” to an existing list of holidays in the “listHolidays” ListBox object at runtime.
listHolidays.Items.Add(“New Year’s Day”);
listHolidays.Items.Append(“New Year’s Day”);
listHolidays.Add(“New Year’s Day”);
listHolidays.Append(“New Year’s Day”);