Once again, to use the control, you can click its arrow, which causes the list to display. You can also display the list using the keyboard by pressing Alt + down arrow key after giving focus to the control. Once the list displays, if you see the desired item, you can click it, which would cause the list to collapse and use the clicked item as the new selection. You can also press the up or down arrow key to select an item and press Enter when the desired item is highlighted. If you don't want to select anything from the list, you can click the arrow again, click anywhere away from the list, or press Esc.
Practical Learning: Using the Drop Down List Combo Box
1- To use a combo box, on the main menu or WordPad, click Format -> Paragraph...
2- Click the arrow of the Alignment combo box
3- Click Center and click OK
2- Click the arrow of the Alignment combo box
3- Click Center and click OK
The Simple Combo Box
The last type of combo box is called a simple combo box. This type of combo box is also made of two parts but they are distinct. The top section of the combo box displays a text box. Immediately under the text box, there is a list box: Notice that the control doesn't display an arrow since the list is available already. To use this combo box, you can examine the list part. If you see the desired item, you can click it. When an item is clicked, it becomes the string of the top text part. If you click a different item, it would become the new selection, replacing the one that was in the text part. Although this appears as a list box, you cannot select more than one item.
Practical Learning: Using a Drop Down Combo Box
1- On the main menu of WordPad, click Format -> Font...
2- Notice that the Font, the Font Style, and the Size combo boxes are of type Simple
3- Click the text box under Font, press Home, then press and hold down Delete. After deleting the whole text, release Delete1- On the main menu of WordPad, click Format -> Font...
2- Notice that the Font, the Font Style, and the Size combo boxes are of type Simple
4- Type Tim
5- When Times New Roman appear, press the down arrow key to select
6- Click OK
The Month Calendar Control
The .NET Framework provides a control used to select dates on a colorful calendar: The dates used and the way they display are based on the Regional Settings of the Control Panel. It may also depend on the operating system. This convenient control is called Month Calendar. The title bar of the control displays two buttons and two labels. The left button allows you to select the previous month by clicking the button. The left label displays the currently selected month. The right label displays the year of the displayed date. The right button is used to get to the next month.
The calendar can be configured to display more than one month. Here is an example that displays two months:
If the control is displaying more than one month, the buttons would increment or decrement by the previous or next month in the list. For example, if the control is displaying April and May, if you click the left button, the control would display March and April. If the control is displaying April and May and you click the right button, the control would display May and June.
To select any month of the current year, you can click the name of the month, which displays the list of months and this allows you to click the desired month:
To select any month of the current year, you can click the name of the month, which displays the list of months and this allows you to click the desired month:
To select a year, you can click the year number. This changes the year label into a spin button:
To change the year, you can click the up or down arrows of the spin button. As the spin button is displaying, you can also use the arrow keys of the keyboard to increase or decrease the value.Under the title bar, the short names of week days display, using the format set in Control Panel. In US English, the first day is usually Sunday. The first day can be changed by the programmer.
On the control, the currently selected date has a circle around. To select a date on the control, you click the desired date, which changes from the previous selection.In the main area, the numeric days of the month display on a white background (this color and any color on the control can be changed). To select a date, you click it in the list. By default, the calendar opens with today's day circled with a hand-drawn-look-alike ellipse. Using the buttons of the title bar, the month label, and/or the year, the user can change the date. If at one time the calendar is displaying a date other than today, and if you want to return to today's date, you can click the bottom label that displays Today.
No comments:
Post a Comment