mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 15:21:48 +02:00
Docs: LCL/stdctrls. Removes unnecessary whitespace in code examples.
This commit is contained in:
parent
02314916b4
commit
493e4b2f6c
@ -1426,17 +1426,17 @@ enumeration.
|
|||||||
For example:
|
For example:
|
||||||
</p>
|
</p>
|
||||||
<code>
|
<code>
|
||||||
// does the style include an edit box?
|
// does the style include an edit box?
|
||||||
if AComboBox.Style.HasEditBox then DoSomething;
|
if AComboBox.Style.HasEditBox then DoSomething;
|
||||||
|
|
||||||
// does the style use owner-draw?
|
// does the style use owner-draw?
|
||||||
if AComboBox.Style.IsOwnerDrawn then DoSomething;
|
if AComboBox.Style.IsOwnerDrawn then DoSomething;
|
||||||
|
|
||||||
// does the style use variable height items?
|
// does the style use variable height items?
|
||||||
if AComboBox.Style.IsVariable then DoSomething;
|
if AComboBox.Style.IsVariable then DoSomething;
|
||||||
|
|
||||||
// toggle the edit box visibility and use in the current style
|
// toggle the edit box visibility and use in the current style
|
||||||
AComboBox.Style := AComboBox.Style.SetEditBox(False);
|
AComboBox.Style := AComboBox.Style.SetEditBox(False);
|
||||||
</code>
|
</code>
|
||||||
</descr>
|
</descr>
|
||||||
<seealso>
|
<seealso>
|
||||||
@ -8360,7 +8360,7 @@ property value can be assigned at design-time using the Object Inspector in
|
|||||||
the Lazarus IDE, or at run-time in program code. For example:
|
the Lazarus IDE, or at run-time in program code. For example:
|
||||||
</p>
|
</p>
|
||||||
<code>
|
<code>
|
||||||
Edit1.Text := 'Ångström';
|
Edit1.Text := 'Volts DC';
|
||||||
ShowMessage('Unit Measure = ' + Edit1.Text);
|
ShowMessage('Unit Measure = ' + Edit1.Text);
|
||||||
</code>
|
</code>
|
||||||
<p>
|
<p>
|
||||||
@ -8493,8 +8493,8 @@ The textual values in the multi-line control can be accessed using the
|
|||||||
ordinal position in the list of values. For example:
|
ordinal position in the list of values. For example:
|
||||||
</p>
|
</p>
|
||||||
<code>
|
<code>
|
||||||
// var sContent: String; ...
|
// var sContent: String;
|
||||||
sContent := AMemo.Lines[2];
|
sContent := AMemo.Lines[2];
|
||||||
</code>
|
</code>
|
||||||
<p>
|
<p>
|
||||||
This provides access to the third value in List (index positions are
|
This provides access to the third value in List (index positions are
|
||||||
@ -8507,8 +8507,8 @@ Each line of text is separated by the <var>LineEnding</var> character
|
|||||||
sequence for the host platform or operating system. For example:
|
sequence for the host platform or operating system. For example:
|
||||||
</p>
|
</p>
|
||||||
<code>
|
<code>
|
||||||
// var sContent: String; ...
|
// var sContent: String; ...
|
||||||
sContent := AMemo.Lines.Text;
|
sContent := AMemo.Lines.Text;
|
||||||
</code>
|
</code>
|
||||||
<p>
|
<p>
|
||||||
Please note: There is a difference in TCustomMemo / TMemo between the
|
Please note: There is a difference in TCustomMemo / TMemo between the
|
||||||
@ -8543,9 +8543,9 @@ end;
|
|||||||
procedure TForm1.Memo1Change(Sender: TObject);
|
procedure TForm1.Memo1Change(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if not TCustomMemo(Sender).Modified then
|
if not TCustomMemo(Sender).Modified then
|
||||||
StaticText1.Caption := 'Memo changed in code'
|
StaticText1.Caption := 'Memo changed in code'
|
||||||
else
|
else
|
||||||
StaticText1.Caption := 'Memo changed by user';
|
StaticText1.Caption := 'Memo changed by user';
|
||||||
end;
|
end;
|
||||||
</code>
|
</code>
|
||||||
<p>
|
<p>
|
||||||
@ -9041,10 +9041,10 @@ It is a convenience method, and calls the <var>Add</var> method in the Lines
|
|||||||
member.
|
member.
|
||||||
</p>
|
</p>
|
||||||
<code>
|
<code>
|
||||||
// var sLine: String;
|
// var sLine: String;
|
||||||
// the following are equivalent
|
// the following are equivalent
|
||||||
AMemo.Append(sLine);
|
AMemo.Append(sLine);
|
||||||
AMemo.Lines.Add(sLine);
|
AMemo.Lines.Add(sLine);
|
||||||
</code>
|
</code>
|
||||||
</descr>
|
</descr>
|
||||||
<seealso/>
|
<seealso/>
|
||||||
@ -9100,10 +9100,10 @@ defined in TStrings. The Strings property in Lines allows an individual line
|
|||||||
of text to be accessed by its ordinal position. For example:
|
of text to be accessed by its ordinal position. For example:
|
||||||
</p>
|
</p>
|
||||||
<code>
|
<code>
|
||||||
// var sContent: String;
|
// var sContent: String;
|
||||||
sContent := AMemo.Lines.Strings[2];
|
sContent := AMemo.Lines.Strings[2];
|
||||||
// equivalent to preceding since Strings is the default property
|
// equivalent to preceding since Strings is the default property
|
||||||
sContent := AMemo.Lines[2];
|
sContent := AMemo.Lines[2];
|
||||||
</code>
|
</code>
|
||||||
<p>
|
<p>
|
||||||
The Text property in Lines allows access to all of the values stored in
|
The Text property in Lines allows access to all of the values stored in
|
||||||
@ -9111,8 +9111,8 @@ Lines. Text lines are separated by the <var>LineEnding</var> character
|
|||||||
sequence defined for the host platform or operating system. For example:
|
sequence defined for the host platform or operating system. For example:
|
||||||
</p>
|
</p>
|
||||||
<code>
|
<code>
|
||||||
// var sContent: String;
|
// var sContent: String;
|
||||||
sContent := AMemo.Lines.Text;
|
sContent := AMemo.Lines.Text;
|
||||||
</code>
|
</code>
|
||||||
<p>
|
<p>
|
||||||
Changing the values in Lines causes the Modified property to be set to
|
Changing the values in Lines causes the Modified property to be set to
|
||||||
@ -9358,8 +9358,8 @@ The textual values in the multi-line control can be accessed using the
|
|||||||
ordinal position in the list of values. For example:
|
ordinal position in the list of values. For example:
|
||||||
</p>
|
</p>
|
||||||
<code>
|
<code>
|
||||||
// var sContent: String; ...
|
// var sContent: String; ...
|
||||||
sContent := AMemo.Lines[2];
|
sContent := AMemo.Lines[2];
|
||||||
</code>
|
</code>
|
||||||
<p>
|
<p>
|
||||||
This provides access to the third value in List (index positions are
|
This provides access to the third value in List (index positions are
|
||||||
@ -9372,8 +9372,8 @@ Each line of text is separated by the <var>LineEnding</var> character
|
|||||||
sequence for the host platform or operating system. For example:
|
sequence for the host platform or operating system. For example:
|
||||||
</p>
|
</p>
|
||||||
<code>
|
<code>
|
||||||
// var sContent: String; ...
|
// var sContent: String;
|
||||||
sContent := AMemo.Lines.Text;
|
sContent := AMemo.Lines.Text;
|
||||||
</code>
|
</code>
|
||||||
<p>
|
<p>
|
||||||
Please note: There is a difference in TCustomMemo / TMemo between the
|
Please note: There is a difference in TCustomMemo / TMemo between the
|
||||||
@ -13861,7 +13861,9 @@ form will reflect the changes as well.
|
|||||||
You can also explicitly change the properties of the object in code by typing
|
You can also explicitly change the properties of the object in code by typing
|
||||||
(in the appropriate Implementation section of the Source editor), for example
|
(in the appropriate Implementation section of the Source editor), for example
|
||||||
</p>
|
</p>
|
||||||
<code>Form1.Button1.Height := 48;</code>
|
<code>
|
||||||
|
Form1.Button1.Height := 48;
|
||||||
|
</code>
|
||||||
<p>
|
<p>
|
||||||
In summary, there are usually about three different ways to determine each
|
In summary, there are usually about three different ways to determine each
|
||||||
property of a component:
|
property of a component:
|
||||||
|
Loading…
Reference in New Issue
Block a user