From 493e4b2f6c52f684919b8ebd55b0737365c44e6a Mon Sep 17 00:00:00 2001
From: dsiders
- // does the style include an edit box?
- if AComboBox.Style.HasEditBox then DoSomething;
+// does the style include an edit box?
+if AComboBox.Style.HasEditBox then DoSomething;
- // does the style use owner-draw?
- if AComboBox.Style.IsOwnerDrawn then DoSomething;
+// does the style use owner-draw?
+if AComboBox.Style.IsOwnerDrawn then DoSomething;
- // does the style use variable height items?
- if AComboBox.Style.IsVariable then DoSomething;
+// does the style use variable height items?
+if AComboBox.Style.IsVariable then DoSomething;
- // toggle the edit box visibility and use in the current style
- AComboBox.Style := AComboBox.Style.SetEditBox(False);
+// toggle the edit box visibility and use in the current style
+AComboBox.Style := AComboBox.Style.SetEditBox(False);
-Edit1.Text := 'Ångström';
+Edit1.Text := 'Volts DC';
ShowMessage('Unit Measure = ' + Edit1.Text);
@@ -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:
- // var sContent: String; ...
- sContent := AMemo.Lines[2];
+// var sContent: String;
+sContent := AMemo.Lines[2];
This provides access to the third value in List (index positions are @@ -8507,8 +8507,8 @@ Each line of text is separated by the LineEnding character sequence for the host platform or operating system. For example:
- // var sContent: String; ...
- sContent := AMemo.Lines.Text;
+// var sContent: String; ...
+sContent := AMemo.Lines.Text;
Please note: There is a difference in TCustomMemo / TMemo between the @@ -8543,9 +8543,9 @@ end; procedure TForm1.Memo1Change(Sender: TObject); begin if not TCustomMemo(Sender).Modified then - StaticText1.Caption := 'Memo changed in code' + StaticText1.Caption := 'Memo changed in code' else - StaticText1.Caption := 'Memo changed by user'; + StaticText1.Caption := 'Memo changed by user'; end;
@@ -9041,10 +9041,10 @@ It is a convenience method, and calls the Add method in the Lines member.
- // var sLine: String;
- // the following are equivalent
- AMemo.Append(sLine);
- AMemo.Lines.Add(sLine);
+// var sLine: String;
+// the following are equivalent
+AMemo.Append(sLine);
+AMemo.Lines.Add(sLine);
- // var sContent: String;
- sContent := AMemo.Lines.Strings[2];
- // equivalent to preceding since Strings is the default property
- sContent := AMemo.Lines[2];
+// var sContent: String;
+sContent := AMemo.Lines.Strings[2];
+// equivalent to preceding since Strings is the default property
+sContent := AMemo.Lines[2];
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 LineEnding character sequence defined for the host platform or operating system. For example:
- // var sContent: String;
- sContent := AMemo.Lines.Text;
+// var sContent: String;
+sContent := AMemo.Lines.Text;
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:
- // var sContent: String; ...
- sContent := AMemo.Lines[2];
+// var sContent: String; ...
+sContent := AMemo.Lines[2];
This provides access to the third value in List (index positions are @@ -9372,8 +9372,8 @@ Each line of text is separated by the LineEnding character sequence for the host platform or operating system. For example:
- // var sContent: String; ...
- sContent := AMemo.Lines.Text;
+// var sContent: String;
+sContent := AMemo.Lines.Text;
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 (in the appropriate Implementation section of the Source editor), for example
-Form1.Button1.Height := 48;
+
+Form1.Button1.Height := 48;
+
In summary, there are usually about three different ways to determine each property of a component: