git-svn-id: trunk@13280 -

This commit is contained in:
kirkpatc 2007-12-11 18:13:40 +00:00
parent 48c79a27ca
commit d5021f931e
5 changed files with 93 additions and 101 deletions

2
.gitattributes vendored
View File

@ -1316,6 +1316,7 @@ docs/xml/lcl/clipbrd.xml svneol=LF#text/xml eol=lf
docs/xml/lcl/clistbox.xml svneol=LF#text/xml eol=lf
docs/xml/lcl/colorbox.xml svneol=LF#text/xml eol=lf
docs/xml/lcl/comctrls.xml svneol=LF#text/xml eol=lf
docs/xml/lcl/comctrls/TrackBarEx.pas -text
docs/xml/lcl/comctrls/ttoolbutton.pas svneol=native#text/plain
docs/xml/lcl/comctrls/ttreenode_data.pas svneol=native#text/plain
docs/xml/lcl/commctrl.xml svneol=LF#text/xml eol=lf
@ -1338,6 +1339,7 @@ docs/xml/lcl/dynhasharray.xml svneol=LF#text/xml eol=lf
docs/xml/lcl/dynqueue.xml svneol=LF#text/xml eol=lf
docs/xml/lcl/editbtn.xml svneol=LF#text/xml eol=lf
docs/xml/lcl/extctrls.xml svneol=LF#text/xml eol=lf
docs/xml/lcl/extctrls/radiobutton.pas -text
docs/xml/lcl/extctrls/statusbar.pas svneol=native#text/plain
docs/xml/lcl/extdlgs.xml svneol=LF#text/xml eol=lf
docs/xml/lcl/extendedstrings.xml svneol=LF#text/xml eol=lf

View File

@ -10,85 +10,47 @@
<short>Several controls commonly used in Lazarus forms</short>
<descr/>
<!-- unresolved type reference Visibility: default -->
<element name="SysUtils">
<short>Unit used by ComCtrls.</short>
</element>
<element name="SysUtils"/>
<!-- unresolved type reference Visibility: default -->
<element name="Classes">
<short>Unit used by ComCtrls.</short>
</element>
<element name="Classes"/>
<!-- unresolved type reference Visibility: default -->
<element name="Math">
<short>Unit used by ComCtrls.</short>
</element>
<element name="Math"/>
<!-- unresolved type reference Visibility: default -->
<element name="FPCAdds">
<short>???</short>
</element>
<!-- unresolved type reference Visibility: default -->
<element name="LCLStrConsts">
<short>Unit used by ComCtrls.</short>
</element>
<element name="LCLStrConsts"/>
<!-- unresolved type reference Visibility: default -->
<element name="LResources">
<short>Unit used by ComCtrls.</short>
</element>
<element name="LResources"/>
<!-- unresolved type reference Visibility: default -->
<element name="LCLIntf">
<short>Unit used by ComCtrls.</short>
</element>
<element name="LCLIntf"/>
<!-- unresolved type reference Visibility: default -->
<element name="LCLType">
<short>Unit used by ComCtrls.</short>
</element>
<element name="LCLType"/>
<!-- unresolved type reference Visibility: default -->
<element name="LCLProc">
<short>Unit used by ComCtrls.</short>
</element>
<element name="LCLProc"/>
<!-- unresolved type reference Visibility: default -->
<element name="AvgLvlTree">
<short>Unit used by ComCtrls.</short>
</element>
<element name="AvgLvlTree"/>
<!-- unresolved type reference Visibility: default -->
<element name="LMessages">
<short>Unit used by ComCtrls.</short>
</element>
<element name="LMessages"/>
<!-- unresolved type reference Visibility: default -->
<element name="ImgList">
<short>Unit used by ComCtrls.</short>
</element>
<element name="ImgList"/>
<!-- unresolved type reference Visibility: default -->
<element name="ActnList">
<short>Unit used by ComCtrls.</short>
</element>
<element name="ActnList"/>
<!-- unresolved type reference Visibility: default -->
<element name="GraphType">
<short>Unit used by ComCtrls.</short>
</element>
<element name="GraphType"/>
<!-- unresolved type reference Visibility: default -->
<element name="Graphics">
<short>Unit used by ComCtrls.</short>
</element>
<element name="Graphics"/>
<!-- unresolved type reference Visibility: default -->
<element name="Menus">
<short>Unit used by ComCtrls.</short>
</element>
<element name="Menus"/>
<!-- unresolved type reference Visibility: default -->
<element name="Controls">
<short>Unit used by ComCtrls.</short>
</element>
<element name="Controls"/>
<!-- unresolved type reference Visibility: default -->
<element name="Forms">
<short>Unit used by ComCtrls.</short>
</element>
<element name="Forms"/>
<!-- unresolved type reference Visibility: default -->
<element name="StdCtrls">
<short>Unit used by ComCtrls.</short>
</element>
<element name="StdCtrls"/>
<!-- unresolved type reference Visibility: default -->
<element name="ExtCtrls">
<short>Unit used by ComCtrls.</short>
</element>
<element name="ExtCtrls"/>
<!-- unresolved type reference Visibility: default -->
<element name="ToolWin">
<short/>
@ -96,13 +58,9 @@
<seealso/>
</element>
<!-- unresolved type reference Visibility: default -->
<element name="CommCtrl">
<short>Unit used by ComCtrls.</short>
</element>
<element name="CommCtrl"/>
<!-- unresolved type reference Visibility: default -->
<element name="Buttons">
<short>Unit used by ComCtrls.</short>
</element>
<element name="Buttons"/>
<!-- enumeration type Visibility: default -->
<element name="THitTest">
<short/>
@ -7950,8 +7908,10 @@ To add, change or delete a column use the Columns property.</descr>
<element name="TTrackBarScalePos.trBottom"><short/></element>
<!-- object Visibility: default -->
<element name="TCustomTrackBar">
<short><i>TCustomTrackBar</i> - the base class for <i>TTrackBar</i></short>
<descr><i>TCustomTrackBar</i> defines many of the properties inherited by <i>TTrackBar</i>, a control for graphically displaying the progress of a process</descr>
<short><i>TCustomTrackBar</i> - the base class for <i>TTrackBar</i></short>
<descr>
<p><i>TCustomTrackBar</i> defines many of the properties inherited by <i>TTrackBar</i>, a device that allows the user to determine the value of a variable using a quasi-analog slider</p>
</descr>
</element>
<!-- variable Visibility: private -->
<element name="TCustomTrackBar.FOrientation">
@ -8197,53 +8157,39 @@ To add, change or delete a column use the Columns property.</descr>
<element name="TCustomTrackBar.SetTick.Value"><short/></element>
<!-- property Visibility: published -->
<element name="TCustomTrackBar.Frequency">
<short/>
<descr/>
<seealso/>
<short><i>Frequency </i>- how frequently the position of the slider is to be read and updated (currently unsupported)</short>
</element>
<!-- property Visibility: published -->
<element name="TCustomTrackBar.LineSize">
<short/>
<descr/>
<seealso/>
<short><i>Line-Size </i>- increment for slider position when an arrow key is pressed</short>
</element>
<!-- property Visibility: published -->
<element name="TCustomTrackBar.Max">
<short/>
<descr/>
<seealso/>
<short><i>Max </i>- the value corresponding to full movement of the slider. Default = 10</short>
</element>
<!-- property Visibility: published -->
<element name="TCustomTrackBar.Min">
<short/>
<descr/>
<seealso/>
<short><i>Min</i> - the value associated with the minimum slider position. Default = 0</short>
</element>
<!-- property Visibility: published -->
<element name="TCustomTrackBar.OnChange">
<short>Action to be taken on change in the process being tracked</short>
<short><i>OnChange</i> - action to be taken on change in the slider position</short>
</element>
<!-- property Visibility: published -->
<element name="TCustomTrackBar.Orientation">
<short><i>TTrackBarOrientation</i> - horizontal or vertical</short>
<short><i>Orientation</i> - horizontal or vertical</short>
</element>
<!-- property Visibility: published -->
<element name="TCustomTrackBar.PageSize">
<short/>
<descr/>
<seealso/>
<short><i>PageSize</i> - increment for slider position when PageUp or PageDown key is pressed</short>
</element>
<!-- property Visibility: published -->
<element name="TCustomTrackBar.Position">
<short/>
<descr/>
<seealso/>
<short><i>Position </i>- the location of the slider along the track bar. Represents the Return value from the control</short>
</element>
<!-- property Visibility: published -->
<element name="TCustomTrackBar.ScalePos">
<short/>
<descr/>
<seealso/>
<short><i>ScalePos </i>- whether scaling label appears at top, bottom, left or right</short>
</element>
<!-- property Visibility: published -->
<element name="TCustomTrackBar.ShowScale">
@ -8259,23 +8205,24 @@ To add, change or delete a column use the Columns property.</descr>
</element>
<!-- property Visibility: published -->
<element name="TCustomTrackBar.TickMarks">
<short/>
<descr/>
<seealso/>
<short><i>Tickmarks </i>- whether the ticks are above/left, below/right, or both</short>
<descr><i>Tickmarks </i>- wherr the ticks appear relative to the bar: above/left, below/right, or both</descr>
</element>
<!-- property Visibility: published -->
<element name="TCustomTrackBar.TickStyle">
<short/>
<descr/>
<seealso/>
<short><i>TickStyle </i>- none, produced automatically, or calculated mnually</short>
</element>
<!-- object Visibility: default -->
<element name="TTrackBar">
<short>Track Bar</short>
<descr>Track Bar: a device that appears at the bottom of a window or panel or form, showing the progress of a process or allowing the user to select (with the mouse pointer) a value denoting how much of a procedure is to be accepted.</descr>
<seealso>
<link id="#lcl.stdctrls.HowToUseStdCtrls">HowToUseStdCtrls</link>
</seealso>
<short><i>TTrackBar</i>: a device which allows the user to determine the value of a variable using a quasi-analog slider</short>
<descr>
<p><i>TTrackBar</i>: a device which allows the user to determine the value of a variable using a quasi-analog slider</p>
<p>The device looks like a slider-potentiometer control on a hi-fi amplifier, and consists of a slider which can be moved along a bar using the mouse. Tick marks can be displayed along one or both edges, giving an indication of the proportion of the maximum value of the controlled variable that is being selected.</p>
<p>The <i>Position</i> property indicates the distance along the bar that the slider has been placed, either by the program or by mouse capture and movement</p>
<p>In the example, movement of the slider is detected and shown in the associated <link id="#lcl.ComCtrls.TProgressBar">TProgressBar</link>.</p>
</descr>
<seealso><link id="#lcl.stdctrls.HowToUseStdCtrls"/></seealso>
<example file="comctrls/TrackBarEx.pas"/>
</element>
<!-- property Visibility: published -->
<element name="TTrackBar.Align">

View File

@ -0,0 +1,5 @@
procedure TForm1.TrackBar1Change(Sender: TObject);
begin
ProgressBar1.Position := (TrackBar1.Position)*10
end;

View File

@ -3202,15 +3202,21 @@ requiring the user to select one af a set of alternatives</p>
</element>
<!-- object Visibility: default -->
<element name="TRadioGroup">
<short><i>TRadioGroup</i> : A group of related but mutually exclusive radio buttons, requiring the user to select one af a set of alternatives</short>
<short><i>TRadioGroup</i> : A group of related but mutually exclusive radio buttons, requiring the user to select one af a set of alternatives</short>
<descr>
<p><i>TRadioGroup</i>: A group of related but mutually exclusive radio buttons, requiring the user to select one af a set of alternatives. As one button becomes selected, the remaining buttons in the group become automatically deselected.</p>
<p>To Use this control, place it in the required position on the form, then in the Object Inspector select <i>Items</i> and click on the ellipsis (...) to open the string editor. Type in the captions to accompany each check box, then close the string editor and you will see a series of Radio Boxes with their captions displayed beside them. (Note - unlike <link id="#lcl.ExtCtrls.TCheckGroup">TCheckGroup</link>, there is no special RadioGroup editor)</p>
<p>Inherits properties from <link id="#lcl.ExtCtrls.TCustomRadioGroup">TCustomRadioGroup</link> and <link id="#lcl.StdCtrls.TCustomGroupBox">TCustomGroupBox</link></p>
<p><i>TRadioGroup</i> behaves differently from a group of <i>TRadioButton</i> controls placed arbitrarily around a form. </p>
<p>In the case of <i>TRadioButton</i>, the mutual exclusivity is a feature that applies to any <i>RadioButton</i> anywhere in the Form, and the <i>RadioButtons</i> can be rearranged in any order or placed anywhere within the containing <i>Form</i>, while in <i>TRadioGroup</i> the excluisivity applies only to buttons within the Group, which are ordered strictly accordng to their <i>ItemIndex</i> within the <i>Items</i> stringlist. </p>
<p><i>TRadioButton</i> is an entity in itself, with a number of additional properties, whereas the buttons within <i>TRadioGroup</i> 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 <i>RadioButton</i>. </p>
<p>The example shows the difference between the use of <i>TRadioButton</i> and <i>TRadioGroup</i></p>
</descr>
<seealso>
<link id="#lcl.StdCtrls.HowToUseStdCtrls">HowToUseStdCtrls</link>
<link id="#lcl.StdCtrls.HowToUseStdCtrls"/>
<link id="#lcl.StdCtrls.TRadioButton"/>
</seealso>
<example file="extctrls/radiobutton.pas"/>
</element>
<!-- property Visibility: published -->
<element name="TRadioGroup.Align">

View File

@ -0,0 +1,32 @@
{Using TRadioGroup with three entries in Items:
Index 0: Red
Index 1: Amber
Index 2: Green}
procedure TTrivialForm1.RadioGroup1Click(Sender: TObject);
begin
case RadioGroup1.ItemIndex of
0: Shape1.brush.color := clRed;
1: Shape1.brush.color := clYellow;
2: Shape1.brush.color := clGreen
end
end;
{Using three separate RadioButtons}
procedure TForm1.RadioButton1Click(Sender: TObject);
begin
Shape1.brush.color := clRed
end;
procedure TForm1.RadioButton2Click(Sender: TObject);
begin
Shape1.brush.color := clYellow
end;
procedure TForm1.RadioButton3Click(Sender: TObject);
begin
Shape1.brush.color := clGreen
end;