Сделай Сам Свою Работу на 5

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).

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


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.

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.

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.

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.



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.

Cool bars (VCL only)

A cool bar contains child controls that can be moved and resized independ­ently. Each control resides on an individual band. The user positions the controls by dragging the sizing grip to the left of each band.

Combo boxes

A combo box (TComboBox) combines an edit box with a scrollable list. When users enter data into the control by typing or selecting from the list the value of the Text property changes. If AutoComplete is enabled, the application looks for and dis­plays the closest match in the list as the user types the data.

Three types of combo boxes are: standard, drop-down (the default), and drop­down list.

Tree views

A tree view (TTreeView) displays items in an indented outline. The control provides buttons that allow nodes to be expanded and collapsed; You can include icons with items' text labels and display different icons to indicate whether a node is expanded or collapsed. You can also include graphics, such as check boxes, that re­flect state information about the items.

Date-time pickers and month calendars

In GLX applications, the DateTimePicker component displays a list box for en­tering dates or times, while the MonthCalendar component presents a calendar for en­tering dates or ranges of dates.

Scroll boxes

Scroll boxes (TScrollBox) create scrolling areas within a form. Applications often need to display more information than will fit in a particular area. Some con­trols such as list boxes, memos, and forms themselves can automatically scroll their contents.

Another use of scroll boxes is to create multiple scrolling areas (views) in a window. Views are common in commercial word-processor, spreadsheet, and project management applications. Scroll boxes give you the additional flexibility to define arbitrary scrolling subregions of a form.

Tab controls

The tab control component (TTabControl) creates a set of tabs that look like notebook dividers. You can create tabs by editing the Tabs property in the Object In­spector; each string in Tabs represents a. tab. The tab control is a single panel with one set of components on it. To change the appearance of the control when the tabs are clicked, you need to write an OnChange event handler. To create a multipage dia­log box, use a page control instead.

Page controls

The page control component (TPageControl) is a page set suitable for multi- page dialog boxes. A page control displays multiple overlapping pages that are TTabSheet objects. A page is selected in the user interface by clicking a tab on top of the control.

Display controls

There are many ways to provide users with information about the state of an application. For example, some components including Tform have a Caption property that can be set at runtime. You can also create dialog boxes to display messages. In addition, the following components are especially useful for providing visual feed­back at runtime to identify the object.

Status bars

Although you can use a panel to make a status bar, it is simpler to use the TStatusBar component. By default, the status bar's Align property is set to alBottom, which takes care of both position and size.

Progress bars

When your application performs a time-consuming operation, you can use a progress bar (TProgressBar) to show how much of the task is completed. A progress bar displays a dotted line that grows from left to right.

Help and hint properties

Most visual controls can display context-sensitive Help as well L^ ((v L hints at runtime. The HelpContext and HelpFile properties establish a Help <s^n|a*|j|ii,11')er and Help file for the control.

The Hint property contains the text string that appears when the mouse pointer over a control or menu item. To enable hints, set Sho^j |IM| j() fate; setting ParentShowHint to True causes the control's ShowHint prope^ same value as its parent's.


The image component (TImage) displays a graphical image, , -\jtinap, icon, or metafile.


The shape component displays a geometric shape. It is a nonwit^Q^^Bjltrol (a widget-based control in CLX applications) and therefore, cannot i^f(,(,jV|) ||(ierin­put.


The bevel component (TBevel) is a line that can appear rais^j il^ered. Some components, such as TPanel, have built-in properties to create i|()rdcrs.

When such properties are unavailable, use TBevel to create beveled %»|jn |)0xes> or frames.

Paint boxes

The paint box (TPaintBox) allows your application to draw on a j- y^|i'can OnPaint event handler to render an image directly on the paint box's | №w"

ing outside the boundaries of the paint box is prevented.

Animation control

The animation component is a window that silently displays flw au,i,.. \|0deo interleaved (AVI) clip (VCL applications) or a GIF clip (CLX applicJiij^^. ** AVI clip is a series of bitmap frames, like a movie. Although AVI clips cl( u '.^■nd, animation controls work only with silent AVI clips. The files you use m ^Hher uncompressed AVI files or AVI clips compressed using run-length enjc^jjfl j^H)-


/. Answer the questions:

a. What components do provide additional ways of capturing /«/, .

b. For what are track bars useful? In what way?

c. What does a spin edit control (TSpinEdit) let?

d. How can you divide a form into several panes?

e. What are check boxes?

f. What advantages has TToolBar component?

g. When does the value of the Text property change?

h. What allows nodes to be expanded and collapsed?

i. What usages of scroll bars do you know?

j) What can you create with the help of Tab controls?

k) What is the page control component?

I) What are the ways to provide users with information abouj ^g ^j^^ian application?

m) What does progress bar display? n) What must you do to enable hints? o) What is the bevel component? p) What is the animation component?

2.Translate into English: фиксация ввода; области дорожки; средство редактирования вращения; раскрывающийся список; установление размеров захвата; выровненная схема; устройство выбора даты; определять произвольные области прокрутки формы; свойства подсказки; подсказки непосредственной передачи; скошенные формы и компоненты; средства управления просмотра текста; форма цифрового просмотра; непрерывный диапазон; внутри области; интервалы между импульсами сигнала; кнопка вращения; фиксированные приращения; на каждой области окна; упорядо­чивать и управлять визуальными средствами управления; поддерживать однородные измерения и интервал; показать опции типа всплывающих границ; средство управления постоянно находится на индивидуальной полосе; перемещая захват установления размеров; совмещать окно редактирования с прокручиваемым списком; расширить узлы; сокращать узлы; компонент контроля позиции табуляции; многостраничное диалоговое окно; наклады­вающиеся страницы; обработчик события; для обеспечения визуальной об­ратной связи во время выполнения; идентифицировать объект; следить за позициями и размером; операция, занимающая много времени; отображать пунктир; активизировать подсказки; точечные рисунки и иконки; средство управления вне области окна; рисунок вне границ; серия составляюгцих структур точечных рисунков; использование кодирования с переменной длиной строки.


©2015- 2019 stydopedia.ru Все материалы защищены законодательством РФ.