A Topic "Multi-PageControls" has been added to ExtCtrls.xml. Some consequential edits to components within the file.

git-svn-id: trunk@15017 -
This commit is contained in:
kirkpatc 2008-04-30 14:21:22 +00:00
parent 4e712a00be
commit 2d7f529c06

View File

@ -122,20 +122,13 @@
<!-- object Visibility: default -->
<element name="TCustomPage">
<short>
<var>TCustomPage</var>
: The base type for <var>Page</var>
<var>TCustomPage</var>: The base type for <var>Page</var>
</short>
<descr>
<var>TCustomPage</var>
: The base type for the tabbed pages found in notebooks</descr>
<var>TCustomPage</var>: The base type for the tabbed pages found in notebooks
</descr>
<seealso><link id="#lcl.ExtCtrls.Multi-PageControls">Multi-PageControls</link>
</seealso>
</element>
<!-- variable Visibility: private -->
<element name="TCustomPage.FFlags">
@ -252,7 +245,8 @@
</element>
<!-- property Visibility: protected -->
<element name="TCustomPage.TabVisible">
<short/>
<short>
<var>TabVisible</var> - is the Tab for this page visible?</short>
<descr/>
<seealso/>
</element>
@ -346,7 +340,8 @@
</element>
<!-- object Visibility: default -->
<element name="TNBPages">
<short>NoteBook Pages - an array of strings containing the names of the pages</short>
<short>
<var>TNBPages</var> - NoteBook Pages: an array of strings containing the names of the pages</short>
</element>
<!-- variable Visibility: private -->
<element name="TNBPages.FPageList">
@ -574,16 +569,11 @@
<!-- object Visibility: default -->
<element name="TCustomNotebook">
<short>
<var>TCustomNotebook</var> : The base type for <var>TNotebook</var>
<var>TCustomNotebook</var>: The base type for <var>TNotebook</var> and <var>TPageControl</var>
</short>
<descr>
<p>
<var>TCustom Notebook</var>
: The base type for <var>TNotebook</var>
<var>TCustom Notebook</var>: The base type for <var>TNotebook</var> and <var>TPageControl</var>
</p>
<p>A notebook consists of several <var>Pages</var>, usually of similar type and kept indexed. They may contain <var>Images</var> listed in a table. One page is displayed at a time, but the other pages are indicated by tabs which may have their names on them, and a different page can be selected for display by clicking its tab </p>
</descr>
@ -592,7 +582,7 @@
<element name="TCustomNotebook.FAccess">
<short/>
<descr/>
<seealso/>
<seealso><link id="Multi-PageControls">Multi-PageControls</link></seealso>
</element>
<!-- variable Visibility: private -->
<element name="TCustomNotebook.FAddingPages">
@ -1019,15 +1009,16 @@
</element>
<!-- property Visibility: protected -->
<element name="TCustomNotebook.ActivePageComponent">
<short/>
<descr/>
<seealso/>
<short>
<var>ActivePageComponent</var> - the actual contents of the currently selected
<var>Page</var>
</short>
</element>
<!-- property Visibility: protected -->
<element name="TCustomNotebook.ActivePage">
<short/>
<descr/>
<seealso/>
<short>
<var>ActivePage</var> - the name (string) of the
<var>Page</var> that is currently selected and is available for interaction</short>
</element>
<!-- constructor Visibility: public -->
<element name="TCustomNotebook.Create">
@ -1050,7 +1041,8 @@
<!-- function Visibility: public -->
<element name="TCustomNotebook.TabIndexAtClientPos">
<short>
<var>TabIndexAtClientPos</var> - the index value of the Tab at the specified position <var>ClientPos</var>
<var>TabIndexAtClientPos</var> - the index value of the Tab at the specified position
<var>ClientPos</var>
</short>
<descr/>
<errors/>
@ -1108,7 +1100,8 @@
<!-- function Visibility: public -->
<element name="TCustomNotebook.CustomPage">
<short>
<var>CustomPage</var> - returns the page specified by <var>Index</var>
<var>CustomPage</var> - returns the page specified by
<var>Index</var>
</short>
<descr/>
<errors/>
@ -1149,7 +1142,7 @@
<!-- function Visibility: public -->
<element name="TCustomNotebook.GetMinimumTabHeight">
<short>
<var>GetMinimumTabHeight</var> - find th eleast permissible height for a tab</short>
<var>GetMinimumTabHeight</var> - find the least permissible height for a tab</short>
<descr/>
<errors/>
<seealso/>
@ -1271,20 +1264,16 @@
<!-- object Visibility: default -->
<element name="TPage">
<short>
<var>TPage</var> : One of the pages in a tabbed Notebook</short>
<var>TPage</var>: One of the pages in a tabbed Notebook</short>
<descr>
<p>
<var>TPage</var>
: One of the pages in a tabbed Notebook</p>
<var>TPage</var>: One of the pages in a tabbed Notebook</p>
<p>Inherits most of its properties from <link id="#lcl.ExtCtrls.TCustomPage">TCustomPage</link>
</p>
</descr>
<seealso>
<link id="#lcl.StdCtrls.HowToUseStdCtrls">HowToUseStdCtrls</link>
<link id="#lcl.ExtCtrls.MultiPageControls">Multi-PageControls</link>
</seealso>
</element>
<!-- property Visibility: published -->
@ -1416,15 +1405,10 @@
<!-- object Visibility: default -->
<element name="TNotebook">
<short>
<var>TNotebook</var> : A series of tabbed <var>pages</var> placed together to make a notebook</short>
<var>TNotebook</var>: A series of tabbed <var>pages</var> placed together to make a notebook</short>
<descr>
<p>
<var>TNotebook</var>
: A series of tabbed <var>pages</var> placed together to make a notebook</p>
<var>TNotebook</var>: A series of tabbed <var>pages</var> placed together to make a notebook</p>
<p>A notebook consists of several <var>Pages</var>, usually of similar type and kept indexed. They may contain <var>Images</var> listed in a table. One page is displayed at a time, but the other pages are indicated by tabs which may have their names on them, and a different page can be selected by clicking its tab </p>
<p>Inherits most of its properties from <link id="#lcl.ExtCtrls.TCustomNotebook">TCustomNoteBook</link>
</p>
@ -1432,6 +1416,7 @@
<seealso>
<link id="#lcl.StdCtrls.HowToUseStdCtrls">HowToUseStdCtrls</link>
<link id="#lcl.ExtCtrls.TPage">TPage</link>
<seealso><link id="Multi-PageControls">Multi-PageControls</link></seealso>
</seealso>
</element>
<!-- function Visibility: private -->
@ -1860,8 +1845,14 @@
</element>
<!-- object Visibility: default -->
<element name="TShape">
<short>Shape</short>
<descr>Shape: An arbitrary graphic geometrical shape placed on the Form. It may be one of a series of standard shapes defined by TShapeType</descr>
<short>
<var>TShape</var> - An arbitrary graphic geometrical shape placed on the Form. It may be one of a series of standard shapes defined by <var>TShapeType </var>
</short>
<descr>
<p>
<var>TShape</var>: An arbitrary graphic geometrical shape placed on the Form. It may be one of a series of standard shapes defined by <var>TShapeType</var> (stRectangle, stSquare, stRoundRect, stRoundSquare, stEllipse, stCircle, stSquaredDiamond, stDiamond).</p>
<p>It can be displayed using the <var>Paint</var> method and the <var>Brush</var> and <var>Pen</var> tools.</p>
</descr>
</element>
<!-- variable Visibility: private -->
<element name="TShape.FPen">
@ -2101,11 +2092,13 @@
<!-- object Visibility: default -->
<element name="TCustomSplitter">
<short>
<var>TCustomSplitter</var> : the base type for <var>TSplitter</var>
<var>TCustomSplitter</var> : the base type for
<var>TSplitter</var>
</short>
<descr>
<p>
<var>TCustomSplitter</var>: the base type for <var>TSplitter</var>
<var>TCustomSplitter</var>: the base type for
<var>TSplitter</var>
</p>
<p>A Splitter is a vertical or horizontal bar that can be placed on a panel or form, to separate sub-panels functionally and allow re-sizing of the constituent sub-panels</p>
<p>This class defines many of the basic properties for the children classes, such as positioning, sizing and alignment</p>
@ -2724,7 +2717,8 @@
<!-- object Visibility: default -->
<element name="TCustomImage">
<short>
<var>TCustomImage</var> - the base type for <var>TImage</var>
<var>TCustomImage</var> - the base type for
<var>TImage</var>
</short>
<descr>
<var>TCustomImage</var>
@ -2735,8 +2729,10 @@
: The base type for <var>TImage</var>
. This is a control of the class <var>TGraphicControl</var>
: The base type for
<var>TImage</var>
. This is a control of the class
<var>TGraphicControl</var>
, designed to be lightweight and fast</descr>
<seealso>
<link id="#lcl.Controls.TGraphicControl">TGraphicControl</link>
@ -3420,11 +3416,13 @@ Reads or Writes flag if control is re-sized.
<!-- object Visibility: default -->
<element name="TCustomRadioGroup">
<short>
<var>TCustomRadioGroup:</var> the base type for <var>TRadioGroup</var>
<var>TCustomRadioGroup:</var> the base type for
<var>TRadioGroup</var>
</short>
<descr>
<p>
<var>TCustomRadioGroup:</var> the base type for <var>TRadioGroup</var>
<var>TCustomRadioGroup:</var> the base type for
<var>TRadioGroup</var>
</p>
<p>A group of related but mutually exclusive radio buttons,
requiring the user to select one af a set of alternatives</p>
@ -3608,12 +3606,14 @@ requiring the user to select one af a set of alternatives</p>
<!-- property Visibility: protected -->
<element name="TCustomRadioGroup.Columns">
<short>
<var>Columns</var> - the number of columns in which the <var>Items</var> (radio buttons) are to be arranges</short>
<var>Columns</var> - the number of columns in which the
<var>Items</var> (radio buttons) are to be arranges</short>
</element>
<!-- property Visibility: protected -->
<element name="TCustomRadioGroup.ColumnLayout">
<short>
<var>ColumnLayout</var> - <var>HorizontalThenVertical </var> or vice versa</short>
<var>ColumnLayout</var> -
<var>HorizontalThenVertical </var> or vice versa</short>
</element>
<!-- property Visibility: protected -->
<element name="TCustomRadioGroup.OnClick">
@ -3677,10 +3677,13 @@ requiring the user to select one af a set of alternatives</p>
<p>Inherits properties from <link id="#lcl.ExtCtrls.TCustomRadioGroup">TCustomRadioGroup</link> and <link id="#lcl.StdCtrls.TCustomGroupBox">TCustomGroupBox</link>
</p>
<p>
<var>TRadioGroup</var> behaves differently from a group of <var>TRadioButton</var> controls placed arbitrarily around a form. </p>
<var>TRadioGroup</var> behaves differently from a group of
<var>TRadioButton</var> controls placed arbitrarily around a form. </p>
<p>In the case of <var>TRadioButton</var>, the mutual exclusivity is a feature that applies to any <var>RadioButton</var> anywhere in the Form, and the <var>RadioButtons</var> can be rearranged in any order or placed anywhere within the containing <var>Form</var>, while in <var>TRadioGroup</var> the exclusivity applies only to buttons within the Group, which are ordered strictly according to their <var>ItemIndex</var> within the <var>Items</var> stringlist. </p>
<p>
<var>TRadioButton</var> is an entity in itself, with a number of additional properties, whereas the buttons within <var>TRadioGroup</var> are not separate entities, but rather are simply entries in a list of strings, each of which is associated with the on-screen image of a <var>RadioButton</var>. </p>
<var>TRadioButton</var> is an entity in itself, with a number of additional properties, whereas the buttons within
<var>TRadioGroup</var> are not separate entities, but rather are simply entries in a list of strings, each of which is associated with the on-screen image of a
<var>RadioButton</var>. </p>
<p>The example shows the difference between the use of <var>TRadioButton</var> and <var>TRadioGroup</var>
</p>
</descr>
@ -3897,11 +3900,13 @@ requiring the user to select one af a set of alternatives</p>
<!-- object Visibility: default -->
<element name="TCustomCheckGroup">
<short>
<var>TCustomCheckGroup</var>: The base type for <var>TCheckGroup</var>
<var>TCustomCheckGroup</var>: The base type for
<var>TCheckGroup</var>
</short>
<descr>
<p>
<var>TCustomCheckGroup</var>: The base type for <var>TCheckGroup</var>
<var>TCustomCheckGroup</var>: The base type for
<var>TCheckGroup</var>
</p>
<p>This class defines <var>Items</var>, where the captions for individual check boxes are stored, <var>Rows</var> and <var>Columns</var> for arranging the check boxes, and ColumnLayout to determine whether the data are arranged down the columns first, or across the rows first.</p>
</descr>
@ -4187,12 +4192,14 @@ requiring the user to select one af a set of alternatives</p>
<!-- property Visibility: public -->
<element name="TCustomCheckGroup.Columns">
<short>
<var>Columns</var> - the number of columns in which the <var>Items</var> (check boxes) are to be arranges</short>
<var>Columns</var> - the number of columns in which the
<var>Items</var> (check boxes) are to be arranges</short>
</element>
<!-- property Visibility: public -->
<element name="TCustomCheckGroup.ColumnLayout">
<short>
<var>ColumnLayout</var> - <var>HorizontalThenVertical </var>or vice versa</short>
<var>ColumnLayout</var> -
<var>HorizontalThenVertical </var>or vice versa</short>
</element>
<!-- property Visibility: public -->
<element name="TCustomCheckGroup.OnItemClick">
@ -4412,10 +4419,12 @@ either right-click on the control to see the pop-up CheckGroup editor, or in the
<!-- object Visibility: default -->
<element name="TBoundLabel">
<short>
<var>TBoundLabel</var>: A label bound to another object, for example in <var>TLabeledEdit</var>
<var>TBoundLabel</var>: A label bound to another object, for example in
<var>TLabeledEdit</var>
</short>
<descr>
<var>TBoundLabel</var>: A label bound to another object, for example in <var>TLabeledEdit</var>
<var>TBoundLabel</var>: A label bound to another object, for example in
<var>TLabeledEdit</var>
</descr>
<seealso>
<link id="#lcl.ExtCtrls.TLabeledEdit">TLabeledEdit</link>
@ -4599,7 +4608,8 @@ either right-click on the control to see the pop-up CheckGroup editor, or in the
: The base type for <var>LabeledEdit</var>.</p>
: The base type for
<var>LabeledEdit</var>.</p>
<p>Note particularly the <link id="TCustomLabeledEdit.EditLabel">EditLabel</link> property (see <link id="#lcl.Extctrls.TBoundLabel">TBoundLabel</link>), which contains the label attached to the Edit control.</p>
</descr>
<seealso>
@ -5016,11 +5026,13 @@ either right-click on the control to see the pop-up CheckGroup editor, or in the
<!-- object Visibility: default -->
<element name="TCustomPanel">
<short>
<var>TCustomPanel</var>: The base type for <var>TPanel</var>
<var>TCustomPanel</var>: The base type for
<var>TPanel</var>
</short>
<descr>
<p>
<var>TCustomPanel</var>: The base type for <var>TPanel</var>
<var>TCustomPanel</var>: The base type for
<var>TPanel</var>
</p>
<p>A Panel is a defined rectangular area of the form into which other components can be placed to group them functionally and geographically.</p>
<p>
@ -5518,7 +5530,8 @@ either right-click on the control to see the pop-up CheckGroup editor, or in the
</element>
<element name="TCustomTrayIcon">
<short>
<var>TCustomTrayIcon </var>- the base class for <var>TTrayIcon</var>, a multiplatform System Tray component.</short>
<var>TCustomTrayIcon </var>- the base class for
<var>TTrayIcon</var>, a multiplatform System Tray component.</short>
</element>
<element name="TTrayIcon">
<short>
@ -5527,17 +5540,22 @@ either right-click on the control to see the pop-up CheckGroup editor, or in the
<element name="TCustomTrayIcon.Create">
<short>Creates a new instance of the component.</short>
<descr>
<var>Create</var> creates a new instance of a <var>TCustomTrayIcon</var> class.
If <var>AOwner</var> is not <var>Nil</var>, the new component attempts to
<var>Create</var> creates a new instance of a
<var>TCustomTrayIcon</var> class.
If
<var>AOwner</var> is not
<var>Nil</var>, the new component attempts to
insert itself in the list of owned components of the owner.
</descr>
</element>
<element name="TCustomTrayIcon.Destroy">
<short>Destroys the instance of the component.</short>
<descr>
<var>Destroy</var> sends a <var>opRemove</var> notification to all components
<var>Destroy</var> sends a
<var>opRemove</var> notification to all components
in the free-notification list. After that, all owned components are
destroyed by calling <link id="TComponent.DestroyComponents">DestroyComponents</link>
destroyed by calling
<link id="TComponent.DestroyComponents">DestroyComponents</link>
(and hence removed from the list of owned components). When this
is done, the component removes itself from its owner's child component list.
After that, the parent's destroy method is called.
@ -5551,7 +5569,8 @@ After that, the parent's destroy method is called.
</element>
<element name="TCustomTrayIcon.ShowBalloonHint">
<short>
<var>ShowBalloonHint</var> displays a smal balloon-like window near the tray icon. It can be used to send notifications about the status of an action, or notify of a received message or any other event which doesn't require an imediate response. The Ballon window disappears after <var>BallonHintTimeout</var> milliseconds of when the user clicks it or it's close button.</short>
<var>ShowBalloonHint</var> displays a smal balloon-like window near the tray icon. It can be used to send notifications about the status of an action, or notify of a received message or any other event which doesn't require an imediate response. The Ballon window disappears after
<var>BallonHintTimeout</var> milliseconds of when the user clicks it or it's close button.</short>
</element>
<element name="TCustomTrayIcon.GetPosition">
<short>Find the position of the Tray Icon and thus a position suitable to display the hinting BalloonHint. Under Windows an approximate location is detected.</short>
@ -5650,8 +5669,10 @@ After that, the parent's destroy method is called.
<short>Assign the contents of one class to another.</short>
<descr>
<p>
<var>Assign</var> copies the contents of <var>Source</var> to
<var>Self</var>, if the classes of the destination and source classes are
<var>Assign</var> copies the contents of
<var>Source</var> to
<var>Self</var>, if the classes of the destination and source classes are
compatible.
</p>
<p>The <var>TPersistent</var> implementation of <var>Assign</var> does nothing
@ -5712,6 +5733,85 @@ will copy the <var>contents</var> of the <var>Source</var> class to the
<short>
<var>OnShow</var> - event handler for showing (making visible) this page of a notebook</short>
</element>
<topic name="Multi-PageControls">
<short>
<var>Multi-PageControls</var> - controls that offer a selection of alternative pages for display</short>
<descr>
<p>
<var>Multi-PageControls</var> - controls that offer a selection of alternative pages for display</p>
<p>A number of controls, found in Units <var>ExtCtrls</var> and <var>ComCtrls</var>, offer the ability to create multi-page forms with a series of <var>Tabs</var> along one edge that allow the user to select one of the <p>Pages</p> for display and interaction.</p>
<p>These include: <var>TPageControl</var>, <var>TNoteBook</var>, <var>TTabControl</var> and <var>THeaderControl</var> (the Header Control components have a very different structure and function). Icons for all of these exist on the <var>Additional</var> or <var>Common Controls</var> tabs of the Component Palette in the Lazarus IDE.</p>
<p>While the various components may look superficially similar, they differ in properties, inheritance, method of adding additional pages, behaviour at run-time, methods for referencing pages and so on.</p>
<p>We have to be very clear when using the various properties, to distinguish between the word 'Tab' as referring to a Tab indicating an identifier for a page, and 'Tab' as referring to the <b>TAB</b> key on the standard keyboard. In common with most Lazarus components, it is possible to enable each control to be inclused in the <var>TabOrder</var> of <var>TabStops</var> for a <var>Form</var>, so that the component can be reached by repeated pressing of the <b>TAB</b> key, and we must not confuse this use of 'Tab' with the use to denote a <var>Page</var>.</p>
<p>The properties <var>CanTab</var>, <var>TabStop</var> and <var>TabOrder</var> refer to the use of the <b>TAB</b> key to navigate to the relevant control.</p>
<p>Properties such as <var>Tabs</var>, <var>TabIndex</var>, <var>IndexOfTabAt()</var>, <var>TabIndexAtClientPos()</var>, <var>TabPosition</var>, <var>TabHeight</var>, <var>TabWidth</var>, <var>TabVisible</var>, <var>OnCloseTabClicked</var> refer to the use for <var>Page</var> selection.</p>
<p>
<var>TNoteBook</var> and
<var>TPageControl</var> are both descended from
<var>TCustomNoteBook</var> (which is in turn descended from
<var>TWinControl</var>) and have many inherited properties in common.
<var>TPageControl</var> has, in general, more advanced features and is probably intended to replace
<var>TNoteBook</var>.</p>
<p>The following table summarises the main differences between the two components.</p>
<table>
<th>
<td>Property or method</td>
<td>
<var>TNoteBook</var>
</td>
<td>
<var>TPageControl</var>
</td>
</th>
<tr>
<td>Pages, ActivePage</td>
<td>String, TPage</td>
<td>TTabSheet, a more advanced version of TPAge</td>
</tr>
<tr>
<td>Drag/Drop/Dock</td>
<td>Drag properties, but minimal Dock or Drop</td>
<td>Full Drag, Drop, Dock properties and methods</td>
</tr>
<tr>
<td>Indexing</td>
<td>PageIndex</td>
<td>ActivePageIndex, TabIndex</td>
</tr>
<tr>
<td>Showing/Hiding Tabs</td>
<td>ShowTabs</td>
<td>TabVisible in TTabSheet</td>
</tr>
<tr>
<td>Hints</td>
<td>No Hinting methods</td>
<td>ShowHint, ParentShowHint</td>
</tr>
<tr>
<td>Font</td>
<td>No Font properties</td>
<td>Font, ParentFont</td>
</tr>
<tr>
<td>Sensing position of Tab</td>
<td>None</td>
<td>TabPosition, OnGetSiteInfo</td>
</tr>
</table>
<p>The individual Pages in both of the above controls (descended from <var>TCustomNoteBook</var>) are separate and can have their own specific collections of widgets which appear only when the relevant Page is selected by its Tab.</p>
<p>In contrast, the <var>TTabControl</var> component (descended from <var>TCustomTabControl</var>) has only one display area (Protected property <var>DisplayRect</var>), but the image displayed in it is determined by which tab has been selected. Each Tab has an index value which is used to select the appropriate image from an indexed <var>ImageList</var> and display it in the Display Rectangle.</p>
<p>The properties of the Tabs in <var>TTabControl</var> are very configurable compared with those in the controls derived from <var>TCustomNoteBook</var>, allowing for instance the creation of multi-line captions, the placement of images on Tabs, the possibility of the Owner routine determining the drawing of the tab, the configuration of Tab size, the selection of multiple tabs. The trade-off is that the display area is restricted in what it can display, and is essentially confined to display of images.</p>
<p>To use any of the above controls, select them from the relevant tab on the IDE Component Palette and drop them on the form in the required position. Fill in as many relevant properties as you can in the Object Inspector.</p>
<p>To add Tabs or Pages to the controls, select the control with a left mouse click or by selecting from the Component menu in the Object Inspector, then right-click on the component to get a pop-up menu, whose first item will be 'Add Page' or 'Add Tab'.</p>
<p>The Tabs in <var>TTabControl</var> can be edited by selecting 'Tabs' in the Object Inspector, clicking on the ellipsis (...) and using the string editor that pops up.</p>
<p>The pages in<var>TNoteBook</var> or <var>TPageControl</var> can be edited by selecting the <var>ActivePage</var> in the Object Inspector and then editing the properties of the individual page.</p>
<p>
<var>THeaderControl</var> offers a widget that could be placed along the edge of a Panel or Form, allowing a highly customised mechanism for selection. However, there are no intrinsically associated display areas, and it is the developer's responsibility to supply an index associated with the selection from the
<var>THeaderControl</var> and determining what action is to occur or what is to be displayed in any attached Panel or Form.</p>
<p>When the control is first placed selected from the Component Palette and placed on a Form, it consists of an unadorned rectangle. However, selecting the control and right-clicking (or selecting the 'Sections' property in the Object Inspector) gives access to a Sections editor (a StringList editor) and Sections can be added to the control. The sections are separated by vertical lines, and each section can have a string inserted as a label, associated with an Index value. The Sections can be rearranged, re-ordered, or be individually painted</p>
</descr>
</topic>
</module>
<!-- ExtCtrls -->
</package>