Sunday, January 25, 2009

Text Boxes

A text box is a window that is used to display text or to receive text from you. The type of text it displays or the type of text you are asked to provide depends on the application or the situation.
Some text boxes are used only to display text. Either you cannot change the text or only an intermediary action can make it possible to change the text. Some other text boxes would require you to enter text. If you don't, something bad might happen. Some text boxes would display text already, giving you the chance to change the text or to accept the one suggested to you.
In all or most circumstances, you will be informed about the text box and what you are supposed to do with it.
Practical Learning: Using a Text Box Control
1- On the Taskbar, click Start -> (All) Programs-> Games -> FreeCell
2- On the main menu of FreeCell, click Game -> Select Game
3- In the text box, type Jules and click OK
4- Notice that the text box refuses the entry and displays 0
5- Type 8522 and press Enter

6- To close FreeCell, on the main menu, click Game -> Exit
7- When asked whether you want to resign this game, click Yes
The Scroll Bars
A scroll bar is an object that is used to navigate from one end of a window content to another. There are two types of scroll bar: vertical and horizontal.

A vertical scroll bar allows you to navigate up and down to display a hidden section of a document. A horizontal scroll bar allows you to navigate left and right on the document.
To scroll a bar, click the arrow of the section you want to display.
List Boxes
A list box is a rectangular control that displays a list of items. If you see the item that is convenient to the issue at hand, then you can click it. Once an item is clicked, it becomes highlighted, indicating that the item has been selected. If you want to change your choice, you can click another item. Clicking another item deselects the previous item and selects the new one.
Depending on how a list box was configured, you may be able to select more than one item from the list. This is because, as set by the creator of the control, some list boxes allow only one selection while others could let you select as many objects as you want.
To select one item from the list, click it.
To select more than one item, click one of those you need. Press and hold Ctrl. Then click each of the desired items from the list. While making these selections, if you click an item by mistake, to deselect it, click it again and the item would appear "normal". After making the desired selection, release Ctrl. The selected items would be highlighted.
To select items in a range, for example if a list has ten items and you want to select from the 3rd to the 7th item, click either the top item of your desired range, or click the last item of the range you want to select. Press and hold Shift. Then click the item at the other end of the range and release Shift.
Practical Learning: Using a List Box Control
1- To start WordPad, on the Taskbar, click Start -> (All) Programs -> Accessories -> WordPad
2- To see a list box, on the main menu, click Insert -> Date and Time...
3- Click the 12th item from the list and click OK
Combo Boxes



A combo box is a combination of a text box and a list box but is made of three sections. Based in its variations, there are three types of combo boxes:
The Drop Down Combo Box
One of the types of combo boxes is referred to as Drop Down. This control is made of a text box on the left side and a down-pointing arrowed button on the right side. Depending on how the control was created, when it comes up, it may not display anything:

To use the combo box, you can click its down pointing arrow. If you click that arrow, a list would appear (or expand):

If you see an item that you want or an item that you are asked to select, you can click it. After an item has been clicked, two things happen: 1. the list retracts (or collapses) like a plastic; 2. the item that was clicked fills the text part and becomes the new selection:
On the other hand, after displaying the list, if you don't want to select anything from the list, you can click the arrow again or click anywhere away from the list. The list would collapse and the text part would get back to the previous text.
One of the major characteristics of a drop down combo box, as compared to the type we will see next, is that, if you know for sure that the item you are looking for is in the list, you can first delete the text in the text part of the control, then start typing. For example, if the list contains a name such as Gertrude, you can delete the text part, and start typing g. If there is only one item that starts with g, you can then click the arrow twice and the item would be selected. Imagine the list contains such items as Jules and Julienne, if you type the first common letters of these item and double-click the arrow, the first item that has these letters would be selected. This means that, if you want to other item to be selected, you should type the letters beyond the common ones. In the case of Jules and Julienne, if you want Julienne to be selected from an incomplete string, you can type juli and click the arrowed button twice.
So far, we have mentioned that, to display the list of a combo box, you could click its arrowed button. You can also display the list using the keyboard. To start, you must give focus to the control. When a drop down combo box has focus, to display its list, press Alt + down arrow key. To select an item from the list, you can press the down or up arrow key to move down or up. Once the desired item has been selected, you can press Enter. If you don't want to select an item while the list is displaying, press Esc.

No comments:

Post a Comment