
- •Using the Object Repository: Overview
- •Sharing items within a project
- •-Adding items to the Object Repository
- •Sharing objects in a team environment
- •Using an Object Repository item in a project
- •Copying an item
- •Inheriting an item
- •Using project templates
- •Modifying shared items
- •Specifying a default project, new form, and main form
- •Developing the application user interface: Overview
- •Controlling application behavior
- •Working at the application level
- •Using the main form
- •Hiding the main form
- •Adding forms
- •Managing layout
- •Using forms
- •Creating modeless forms such as windows
- •Creating a form instance using a local variable
- •Passing additional arguments to forms
- •Retrieving data from forms
- •Creating and using component templates
- •Working with frames
- •Merging menus
- •Assigning a speed button's glyph
- •Common controls and xp themes
- •1. Answer the questions:
- •8.1 Text viewing controls
- •8.2 Specialized input controls
- •8.3 Track bars
- •Cool bars (vcl only)
- •Combo boxes
- •Tree views
- •Date-time pickers and month calendars
- •Scroll boxes
- •Tab controls
8.1 Text viewing controls
In CLX applications only, the text viewing controls display text but are readonly.
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 adjusting 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 horizontal.
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
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 automatically 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.