Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Анг-язык на 22.10.12.docx
Скачиваний:
3
Добавлен:
20.11.2019
Размер:
38.94 Кб
Скачать

8.1 Text viewing controls

In CLX applications only, the text viewing controls display text but are read­only.

Use this component: When you want users to do this: TTextBrowser Display a text file or simple HTML page that users can scroll through.

TTextViewer Display a text file or simple HTML page. Users can scroll through the page or click links to view other pages and images.

TLCDNumber Display numeric information in a digital display form.

8.2 Specialized input controls

The following components provide additional ways of capturing input. Use this component: When you want users to do this: TScrollBar Select values on a continuous range

TTrackBar Select values on a continuous range (more visually effective than a scroll bar)

TUpDown Select a value from a spinner attached to an edit component (VCL applications only)

THotKey Enter Ctrl/Shift/Alt keyboard sequences (VCL applications only) TSpinEdit Select a value from a spinner widget (CLX applications only).

8.3 Track bars

A track bar can set integer values on a continuous range. It is useful for adjust­ing properties like color, volume and brightness. The user moves the slide indicator by dragging it to a particular location or clicking within the bar.

Use the Max and Min properties to set the upper and lower range of the track

bar.

Use SelEnd and SelStart to highlight a selection range.

The Orientation property determines whether the track bar is vertical or hori­zontal.

By default, a track bar has one row of ticks along the bottom. Use the Tick- Marks property to change their location. To control the intervals between ticks, use the TickStyle property and SetTick method.

  1. Spin edit controls

A spin edit control (TSpinEdit) is also called an up-down widget, little arrows widget, or spin button. This control lets the application user change an integer value in fixed increments, either by clicking the up or down arrow buttons .to increase or decrease the value currently displayed, or by typing the value directly into the spin box.

  1. Splitter controls

A splitter (TSplitter) placed between aligned controls allows users to resize the controls. Used with components like panels and group boxes, splitters let you divide a form into several panes with multiple controls on each pane.

  1. Check boxes

A check box is a toggle that lets the user select an on or off state. When the choice is turned on, the check box is checked. Otherwise, the check box is blank. You create check boxes using TCheckBox.

  1. Toolbars

Toolbars provide an easy way to arrange and manage visual controls. You can create a toolbar out of a panel component and speed buttons, or you can use the TToolBar component, then right-click and choose New Button to add buttons to the toolbar.

The TToolBar component has several advantages: buttons on a toolbar auto­matically maintain uniform dimensions and spacing; other controls maintain their relative position and height; controls can automatically wrap around to start a new row when they do not fit horizontally; and TToolBar offers display options like transparency, pop-up borders, and spaces and dividers to group controls.