- •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
Using project templates
Templates are predesigned projects that you can use as starting points for your own work. To create a new project from a template:
Choose File|New|Other to display the New Items dialog box.
Choose the Projects tab.
Select the project template you want and choose OK.
In the Select Directory dialog, specify a directory for the new project's files.
The template files are copied to the specified directory, where you can modify
them. The original project template is unaffected by your changes.
Modifying shared items
If you modify an item in the Object Repository, your changes will affect all future projects that use the item as well as existing projects that have added the item with the Use or Inherit option. To avoid propagating changes to other projects, you have several alternatives:
Copy the item and modify it in your current project only.
Copy the item to the current project, modify it, then add it to the Repository under a different name.
Create a component, DLL, component template, or frame from the item. If you create a component or DLL, you can share it with other developers.
Specifying a default project, new form, and main form
By default, when you choose File|New|Application or File|New|Form, a blank form appears. You can change this behavior by reconfiguring the Repository:
Choose Tools|Repository.
If you want to specify a default project, select the Projects page and choose an item under Objects. Then select the New Project check box.
If you want to specify a default form, select a Repository page (such as Forms), them choose a form under Objects. To specify the default new form
(File|New|Form), select the New Form check box.. To specify the default main form for new projects, select the Main Form check box.
4 Click OK.
Developing the application user interface: Overview
When you open the IDE or create a new project, a blank form is displayed on the screen. You design your application's user interface (UI) by placing and arranging visual components, such as windows, menus, and dialog boxes, from the Component palette onto the form.
Controlling application behavior
TApplication, TScreen, and TForm are the classes that form the backbone of all applications by controlling the behavior of your project. The TApplication class forms the foundation of an application by providing properties and methods that encapsulate the behavior of a standard program. TScreen is used at runtime to keep track of forms and data modules that have been loaded as well as maintaining system- specific information such as screen resolution and available display fonts. Instances of the TForm class are the building blocks of your application's user interface. The windows and dialog boxes in your application are based on TForm.
Working at the application level
The global variable Application, of type TApplication, is in every VCL- or CLX-based application. Application encapsulates your application as well as providing many functions that occur in the background of the program. For instance, Application handles how you call a Help file from the menu of your program. Understanding how TApplication works is more important to a component writer than to developers of stand-alone applications, but you should set the options that Application handles in the Project|Options Application page when you create a project.