Exam 12: Using Controls
When working with a Form in the IDE, how do you place new Control s on the Form , and how can you adjust them precisely to align with existing Control s?
When you place Control s on a Form in the IDE, you can drag them to any location to achieve the effect you want. When you drag multiple Control s onto a Form , blue snap lines appear and help you align new Control s with others already in place. Snap lines also appear when you place a Control closer to the edge of a container than is recommended. You also can use the Location property in a Control 's Properties list to specify a location.
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.
One version of the Font constructor requires two arguments: a string and a float . The string is the name of the font. The float represents the font size. For example:
bigFont = new Font("Courier New"), 16.5f;
You also can create a Font using three arguments, adding FontStyle as in:
Font arialItalic = new Font("Arial"), 24, FontStyle.Italic;
You can combine multiple styles using the pipe ( | . For example, the following code creates a Font that is bold and underlined:
Font fancyFont =
new Font("Helvetica"), 24, FontStyle.Bold | FontStyle.Underline;
The ____________________ property of the PictureBox control sets the image that appears in the control.
Image
CheckBox and RadioButton objects have a ____ method that is called when the object is clicked by the user.
When designing a Form , you will usually use the ____ design features in the IDE instead of typing code statements.
What are some of the commonly used LinkLabel properties, and what is the default event generated when the link is clicked by a user?
A(n) ____________________ is a Control in which you can display graphics from a bitmap, icon, JPEG, GIF, or other image file type.
A ____ provides the capability to link the user to other sources, such as Web pages or files.
A ____ is similar to a ListBox but with check boxes appearing to the left of each item.
Explain the selection options that can be controlled by setting the SelectionMode property of a ListBox .
In a MenuStrip , if you create each main menu item with a(n) ____ in front of a unique letter, then the user can press Alt and the given letter to activate the menu choice as an alternative to clicking it with the mouse.
Setting the ____ property attaches a Control to the side of a container so that the Control stretches when the container's size is adjusted.
You use the ____ class to change the appearance of printed text on your Form s.
A LinkLabel is similar to a Label in that it is a parent of Label .
What are the similarities and differences between using a GroupBox and using a Panel to group related Control s on a Form ?
Control objects such as Form s and Button s, like all other objects in C#, ultimately derive from the ____________________ class.
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?
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.
A ____ 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.
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)