mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 05:00:46 +01:00
* Updated documentation by Chris Kirkpatrick
git-svn-id: trunk@12180 -
This commit is contained in:
parent
1ef0491d4b
commit
5afa2ab39b
6
.gitattributes
vendored
6
.gitattributes
vendored
@ -1225,7 +1225,11 @@ docs/xml/lcl/dbctrls.xml svneol=LF#text/xml eol=lf
|
||||
docs/xml/lcl/dbgrids.xml svneol=LF#text/xml eol=lf
|
||||
docs/xml/lcl/defaulttranslator.xml svneol=LF#text/xml eol=lf
|
||||
docs/xml/lcl/dialogs.xml svneol=LF#text/xml eol=lf
|
||||
docs/xml/lcl/dialogs/inputbox.pas svneol=native#text/plain
|
||||
docs/xml/lcl/dialogs/displaymessagebox.pas svneol=native#text/pascal
|
||||
docs/xml/lcl/dialogs/inputbox.pas svneol=native#text/pascal
|
||||
docs/xml/lcl/dialogs/inputquery.pas svneol=native#text/pascal
|
||||
docs/xml/lcl/dialogs/trymessagedlg.pas svneol=native#text/pascal
|
||||
docs/xml/lcl/dialogs/tryshowmessage.pas svneol=native#text/pascal
|
||||
docs/xml/lcl/dirsel.xml svneol=LF#text/xml eol=lf
|
||||
docs/xml/lcl/dynamicarray.xml svneol=LF#text/xml eol=lf
|
||||
docs/xml/lcl/dynamicarray/tarrayexample.pas svneol=native#text/plain
|
||||
|
||||
@ -6113,7 +6113,8 @@ Either reads a flag containing the set of anchors to be used, or writes a set of
|
||||
<element name="TControl.AnchorSide">
|
||||
<short>Finds which side to use for anchor</short>
|
||||
<descr>// standard properties, which should be supported by all descendants<br/>
|
||||
Finds which side is to be used to anchor this control, and what relationships it has to other controls nearby. For complex relationships, use the Side property of the parent class TAnchorSide, and make a reference eg using asrCenter</descr>
|
||||
|
||||
Finds which side is to be used to anchor this control, <br/>and what relationships it has to other controls nearby. <br/>For complex relationships, use the Side property of the parent class TAnchorSide, <br/>and make a reference eg using asrCenter</descr>
|
||||
<seealso><link id="TAnchorSide"/></seealso>
|
||||
</element>
|
||||
<!-- argument Visibility: default -->
|
||||
@ -6883,10 +6884,9 @@ Reads or writes a flag to find or store the identity of the parent for this cont
|
||||
</element>
|
||||
<!-- object Visibility: default -->
|
||||
<element name="TWinControl">
|
||||
<short/>
|
||||
<descr/>
|
||||
<errors/>
|
||||
<seealso/>
|
||||
<short>The base class for all windowed controls</short>
|
||||
<descr>Defines many of the properties inherited by child classes, <br/>particularly those related to size, position, bounds, docking, <br/>the responses to mouse movements and key presses. <br/>Defines procedures and functions related to windowed controls, <br/>some of which override virtual methods defined in ancestor classes.</descr>
|
||||
<seealso><link id="TControl"/></seealso>
|
||||
</element>
|
||||
<!-- variable Visibility: private -->
|
||||
<element name="TWinControl.FAlignLevel">
|
||||
@ -8519,21 +8519,19 @@ Reads or writes a flag to find or store the identity of the parent for this cont
|
||||
</element>
|
||||
<!-- property Visibility: public -->
|
||||
<element name="TWinControl.BorderWidth">
|
||||
<short/>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
<short>Property to determine width of the window's border</short>
|
||||
<descr>// properties which are supported by all descendents<br/><br/>Either reads a flag to find the width or sets the width. <br/>Default is set to zero.</descr>
|
||||
</element>
|
||||
<!-- property Visibility: public -->
|
||||
<element name="TWinControl.BoundsLockCount">
|
||||
<short/>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
<short>Finds how many of the Bounds are locked</short>
|
||||
<descr>// properties which are supported by all descendents</descr>
|
||||
</element>
|
||||
<!-- property Visibility: public -->
|
||||
<element name="TWinControl.Brush">
|
||||
<short/>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
<short>Find which type of brush to use for drawing the control</short>
|
||||
<descr>// properties which are supported by all descendents</descr>
|
||||
<seealso><link id="graphics.TBrush"/></seealso>
|
||||
</element>
|
||||
<!-- property Visibility: public -->
|
||||
<element name="TWinControl.CachedClientHeight">
|
||||
@ -8555,23 +8553,22 @@ Reads or writes a flag to find or store the identity of the parent for this cont
|
||||
</element>
|
||||
<!-- property Visibility: public -->
|
||||
<element name="TWinControl.ControlCount">
|
||||
<short/>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
<short>The number of controls associated with this window</short>
|
||||
<descr>// properties which are supported by all descendents</descr>
|
||||
</element>
|
||||
<!-- property Visibility: public -->
|
||||
<element name="TWinControl.Controls">
|
||||
<short/>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
<short>Finds which controls are found in this window</short>
|
||||
<descr>// properties which are supported by all descendents</descr>
|
||||
</element>
|
||||
<!-- argument Visibility: default -->
|
||||
<element name="TWinControl.Controls.Index"><short/></element>
|
||||
<element name="TWinControl.Controls.Index">
|
||||
<short>Numerical value to identify the control within the window</short>
|
||||
</element>
|
||||
<!-- property Visibility: public -->
|
||||
<element name="TWinControl.DefWndProc">
|
||||
<short/>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
<short>The default procedure to be associated with the window</short>
|
||||
<descr>// properties which are supported by all descendents<br/>reads or writes a flag to define what is the default procedure</descr>
|
||||
</element>
|
||||
<!-- property Visibility: public -->
|
||||
<element name="TWinControl.DockClientCount">
|
||||
@ -9264,10 +9261,12 @@ TGraphicControl, you must query the ClientRect.</pre>
|
||||
</element>
|
||||
<!-- object Visibility: default -->
|
||||
<element name="TCustomControl">
|
||||
<short>TCustomControl - the base class for window controls</short>
|
||||
<short>TCustomControl - a base class for many window controls</short>
|
||||
<descr>Contains simple basic definitions to create, destroy and paint window controls and set basic properties like canvas and border</descr>
|
||||
<errors/>
|
||||
<seealso/>
|
||||
<seealso>
|
||||
<link id="TWinControl"/>
|
||||
<link id="TControl"/>
|
||||
</seealso>
|
||||
</element>
|
||||
<!-- variable Visibility: private -->
|
||||
<element name="TCustomControl.FCanvas">
|
||||
@ -10443,10 +10442,8 @@ TGraphicControl, you must query the ClientRect.</pre>
|
||||
<element name="AdjustBorderSpace.Bottom"><short/></element>
|
||||
<!-- procedure Visibility: default -->
|
||||
<element name="Register">
|
||||
<short/>
|
||||
<descr/>
|
||||
<errors/>
|
||||
<seealso/>
|
||||
<short>Register the components used in the current application, so that they can be recognised</short>
|
||||
<seealso><link id="#rtl.classes.registercomponents"/></seealso>
|
||||
</element>
|
||||
</module>
|
||||
<!-- Controls -->
|
||||
|
||||
@ -1150,17 +1150,32 @@ Call the Execute function to show the color dialog.</descr>
|
||||
<short>Message Dialog</short>
|
||||
<descr>Show a message to the user and receive his response.
|
||||
<br/>
|
||||
There are four versions of this function. <br/>The first version displays a dialog with the standard caption, <br/>the second, third and fourth versions enable you to set the caption.<br/><br/>
|
||||
The third version allows for a Default button; <br/>the fourth version contains a help keyword instead of using context-based help.
|
||||
<br/><br/>
|
||||
If the first 'Caption' argument is missing, no caption is shown on the box.<br/><br/>
|
||||
This is the most complete and elaborate of the message dialogs, <br/>and allows the programmer considerable control over the appearance of the dialog box.<br/><br/>
|
||||
|
||||
The arguments defining the kind of box and its icon are types rather than integer constants, <br/>and the buttons can be specified as a set in square brackets <br/>eg [mbRetry, mbIgnore, mbAbort, mbCancel].<br/><br/>
|
||||
There are four versions of this function. <br/>
|
||||
The first version displays a dialog with the standard caption, <br/>
|
||||
the second, third and fourth versions enable you to set the caption.<br/><br/>
|
||||
|
||||
The third version allows for a Default button; <br/>
|
||||
the fourth version contains a help keyword instead of using context-based help.
|
||||
<br/><br/>
|
||||
|
||||
If the first 'Caption' argument is missing, no caption is shown on the box.<br/><br/>
|
||||
|
||||
This is the most complete and elaborate of the message dialogs, <br/>
|
||||
and allows the programmer considerable control over the appearance of the dialog box.<br/><br/>
|
||||
|
||||
|
||||
The arguments defining the kind of box and its icon are types rather than integer constants, <br/>
|
||||
and the buttons can be specified as a set in square brackets <br/>
|
||||
eg [mbRetry, mbIgnore, mbAbort, mbCancel].<br/><br/>
|
||||
|
||||
|
||||
The HelpCtx argument allows the use of Context Help<br/><br/>
|
||||
The return value from the Function is the identity of the button pressed, <br/>expressed as an integer (see the constant definitions in <link id="TControl"/>, [mrNone..mrAll]).</descr>
|
||||
<seealso/>
|
||||
|
||||
The return value from the Function is the identity of the button pressed, <br/>
|
||||
expressed as an integer (see the constant definitions in <link id="TControl"/>
|
||||
, [mrNone..mrAll]).</descr>
|
||||
<example file="dialogs/trymessagedlg.pas"/>
|
||||
</element>
|
||||
<!-- function result Visibility: default -->
|
||||
<element name="MessageDlg.Result">
|
||||
@ -1283,11 +1298,23 @@ function. <br/>It has been extended with parameters to place the dialog on a cer
|
||||
<!-- function Visibility: default -->
|
||||
<element name="QuestionDlg">
|
||||
<short>Show a question to the user and get a response</short>
|
||||
<descr>QuestionDlg has the same functionality as MessageDlg <br/>except for the parameter Buttons which is of a different type. <br/>You can define your own captions and return values of this function.<br/><br/>
|
||||
Buttons is a list of TModalResult (defined as constants [mrNone..MrYesToAll] in <link id="Controls"/>) and strings. <br/>For each TModalResult a button is
|
||||
created. <br/>To set a custom caption, add a string after a button.<br/><br/>
|
||||
<descr>QuestionDlg has the same functionality as MessageDlg <br/>
|
||||
except for the parameter Buttons which is of a different type. <br/>
|
||||
You can define your own captions and return values of this function.<br/><br/>
|
||||
|
||||
The default TModalResults defined in controls.pp (mrNone..mrLast) <br/>doesn't need a caption. The default captions will be used.</descr>
|
||||
Buttons is a list of TModalResult (defined as constants [mrNone..MrYesToAll] in <link id="Controls"/>
|
||||
) and strings. <br/>
|
||||
For each TModalResult a button is
|
||||
created. <br/>
|
||||
To set a custom caption, add a string after a button.<br/><br/>
|
||||
|
||||
|
||||
The default TModalResults defined in controls.pp (mrNone..mrLast) <br/>
|
||||
doesn't need a caption. The default captions will be used.</descr>
|
||||
<seealso>
|
||||
<link id="MessageDlg"/>
|
||||
<link id="InputQuery"/>
|
||||
</seealso>
|
||||
</element>
|
||||
<!-- function result Visibility: default -->
|
||||
<element name="QuestionDlg.Result">
|
||||
@ -1325,15 +1352,24 @@ The return value of the function will be 400, 401 or 402, <br/>depending on whet
|
||||
<element name="ShowMessage">
|
||||
<short>Show Message</short>
|
||||
<descr>Procedure ShowMessage (const Msg: string);<br/>
|
||||
The simplest message dialog: takes a simple string as argument, <br/>displays it in a stereotyped box, <br/>and waits for a mouse-click or enter-key event <br/>before returning to the calling routine or program.<br/><br/>
|
||||
This is a modal procedure call, <br/>that is the box is displayed, receives focus, <br/>and does not relinquish focus until the OK box is clicked or otherwise selected.<br/><br/>
|
||||
|
||||
Example<br/><code>Program LazMessage;
|
||||
Uses Dialogs;
|
||||
begin
|
||||
ShowMessage ('This is a message from Lazarus')
|
||||
end.
|
||||
</code></descr>
|
||||
|
||||
The simplest message dialog: takes a simple string as argument, <br/>
|
||||
|
||||
displays it in a stereotyped box, <br/>
|
||||
|
||||
and waits for a mouse-click or enter-key event <br/>
|
||||
|
||||
before returning to the calling routine or program.<br/><br/>
|
||||
|
||||
|
||||
This is a modal procedure call, <br/>
|
||||
|
||||
that is the box is displayed, receives focus, <br/>
|
||||
|
||||
and does not relinquish focus until the OK box is clicked or otherwise selected.<br/><br/></descr>
|
||||
<seealso><link id="forms.TApplication.MessageBox"/></seealso>
|
||||
<example file="dialogs/tryshowmessage.pas"/>
|
||||
</element>
|
||||
<!-- argument Visibility: default -->
|
||||
<element name="ShowMessage.aMsg">
|
||||
@ -1385,7 +1421,11 @@ end.
|
||||
The function result is a boolean which returns TRUE if the OK button was pressed, or FALSE if the box was closed by any other mechanism (such as clicking the 'Close' icon on the top title bar). </p>
|
||||
<p>Omitting the MaskInput argument is equivalent to setting it FALSE.</p>
|
||||
</descr>
|
||||
<seealso><link id="InputBox"/></seealso>
|
||||
<seealso>
|
||||
<link id="InputBox"/>
|
||||
<link id="PasswordBox"/>
|
||||
</seealso>
|
||||
<example file="dialogs/inputquery.pas"/>
|
||||
</element>
|
||||
<!-- function result Visibility: default -->
|
||||
<element name="InputQuery.Result">
|
||||
@ -1499,10 +1539,8 @@ There are two version of this function, the second one having the ability to ind
|
||||
</element>
|
||||
<!-- procedure Visibility: default -->
|
||||
<element name="Register">
|
||||
<short/>
|
||||
<descr/>
|
||||
<errors/>
|
||||
<seealso/>
|
||||
<short>Register the components used in the current application, so that they can be recognised</short>
|
||||
<seealso><link id="#rtl.classes.registercomponents"/></seealso>
|
||||
</element>
|
||||
<element name="TFindDialog">
|
||||
<short>A dialog used for finding text within the current editor or text buffer</short>
|
||||
|
||||
12
docs/xml/lcl/dialogs/displaymessagebox.pas
Normal file
12
docs/xml/lcl/dialogs/displaymessagebox.pas
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
Uses Forms, Dialogs, LCLType;
|
||||
|
||||
Procedure DisplayMessageBox;
|
||||
var reply, boxstyle: integer;
|
||||
begin
|
||||
with application do begin
|
||||
boxstyle := MB_ICONQUESTION + MB_YESNO;
|
||||
reply := MessageBox ('Press either button', 'MessageBoxDemo', boxstyle);
|
||||
if reply = IDYES then MessageBox ('Yes ', 'Reply',MB_ICONINFORMATION)
|
||||
else MessageBox ('No ', 'Reply', MB_ICONHAND)
|
||||
end;
|
||||
15
docs/xml/lcl/dialogs/inputquery.pas
Normal file
15
docs/xml/lcl/dialogs/inputquery.pas
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
Uses forms, lcltype, dialogs, controls;
|
||||
|
||||
procedure TryInputQuery;
|
||||
var QueryResult: boolean;
|
||||
userstring: string;
|
||||
begin
|
||||
if InputQuery ('Question', 'Type in some data', TRUE, userstring)
|
||||
then ShowMessage (userstring)
|
||||
else
|
||||
begin
|
||||
InputQuery ('Don''t be silly', 'Please try again', userstring);
|
||||
ShowMessage (userstring)
|
||||
end
|
||||
end;
|
||||
9
docs/xml/lcl/dialogs/trymessagedlg.pas
Normal file
9
docs/xml/lcl/dialogs/trymessagedlg.pas
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
Uses forms, dialogs, lcltype, controls;
|
||||
|
||||
procedure TryMessageDlg;
|
||||
begin
|
||||
if MessageDlg ('Question', 'Do you wish to Execute?', mtConfirmation,
|
||||
[mbYes, mbNo, mbIgnore],0) = mrYes
|
||||
then { Execute rest of Program };
|
||||
end;
|
||||
6
docs/xml/lcl/dialogs/tryshowmessage.pas
Normal file
6
docs/xml/lcl/dialogs/tryshowmessage.pas
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
Program LazMessage;
|
||||
Uses Dialogs;
|
||||
begin
|
||||
ShowMessage ('This is a message from Lazarus')
|
||||
end.
|
||||
Loading…
Reference in New Issue
Block a user