Sign in Join
Wiki copytemporary

Lazarus Tutorial/zh CN: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11*这是Lazarus教程的起点。你可以自由地把自己的体会添加到这里。*
22
33## 概述
44
55Lazarus是一个自由并且开源的RAD(快速应用开发)开发工具,它基于同样自由开源的FreePascal(object pascal)编译器。Lazarus IDE([screenshot](http://lazarus-ccr.sourceforge.net/kbdata/lazide.jpg))可以创建独立的(原文是self-standing,我不确认是否准确)的图形或控制台程序,同时稳定并且富于特色.目前可以运行在Linux, FreeBSD和Win32平台下,同时提供可自定义的源代码编辑器,包含包管理器的可视化GUI设计环境,以及完整地集成在GUI环境中的调试器和FreePascal编译器。
66
77## 起点 - 你的第一个Lazarus程序!
88
99(感谢User:Kirkpatc)
1010
1111首先,[[Installing Lazarus/zh CN|安装Lazarus]],然后运行Lazarus,当然还要确定你有可以使用的FreePascal编译器。
1212
1313桌面上将出现很多窗口:顶部是主菜单,左面是对象观察器,Lazarus源代码编辑器将占据大部分的桌面,而一个预置的Form1窗体将覆盖在源代码编辑器的上面。
1414
1515首先,如果你的Lazarus是全英文的,那么你可以通过主菜单上的Environment -\> Environment Options打开环境设置窗口,在Desktop标签下有Language选项,改成Chinese (zh_CN),确定后重新启动下Lazarus,绝大部分界面就是中文的了。
1616
1717注:对于linux用户,Lazarus的默认编译/安装很大可能是使用GTK1库(非常容易辩认...因为非常丑...),GTK1对于Unicode的支持不完善,无法显示中文,你可以使用GTK2重新编译Lazarus,具体方法请参照[[Quick start: Recompile the IDE]]。
1818
1919在顶部的主菜单上,菜单分隔线的下面有一排标签。如果Standard标签还未被选中,单击选中它。然后找到TButton图标(一个有OK字样的矩形),单击Tbutton图标,然后在Form1窗体上找个宽敞的地方单击一下。一个有着"Button1"标题的矩形按钮就出现了。重复一次,你将获得"Button2"按钮,建议你把它放到Button1的右面。
2020
2121现在单击Button1选中它,左侧的对象观察器上将出现Button1对象的所有属性。找到名为Caption的属性(你可以在"收藏夹"标签下更方便地找到它),现在这个属性的值是"Button1"。单击显示着"Button1"的方格,把里面"Button1"文本改成"Press",当你按下Enter(或者单击别的方格)后,你会看见Form1窗体上的Button1按钮上的文本变成了"Press"。然后找到对象观察器上的"事件"标签,你会看见可以给Button1关联很多事件(Event),包括OnClick,OnEnter,OnExit等等。选择OnClick右边的空白方格,将出现一个显示"..."(三个点,也就是省略号)的小方格,在这个方格上单击,你将自动跳转到源代码编辑器,同时你的光标会处于一段过程(procedure)代码中:
2222
23-` procedure TForm1.Button1Click(Sender: TObject);`\
24-` begin`\
25-`   {你的光标将位于这里,请输入后面的代码:}`\
26-`   Button1.caption := 'Press again';`\
27-`   {源代码编辑器已经自动完成了这个过程的其他部分}`\
28-` end;`
23+``` pascal
24+ procedure TForm1.Button1Click(Sender: TObject);
25+ begin
26+ {你的光标将位于这里,请输入后面的代码:}
27+ Button1.caption := 'Press again';
28+ {源代码编辑器已经自动完成了这个过程的其他部分}
29+ end;
30+```
2931
3032按下F12选中Form1窗体。
3133
3234然后我们来编辑Button2的属性,将Caption修改为"Exit",然后选择OnClick事件,单击那个显示"..."的小方格,你又回到了源代码编辑器,光标位于另一段过程代码的中间:
3335
34-` procedure TForm1.Button2Click(Sender: TObject);`\
35-` begin`\
36-`   {输入:}`\
37-`   Close;`\
38-` end;`
36+``` pascal
37+ procedure TForm1.Button2Click(Sender: TObject);
38+ begin
39+ {输入:}
40+ Close;
41+ end;
42+```
3943
4044再次按下F12选中Form1窗体。现在可以尝试编译这个程序了。最简单的方法是在顶部主菜单中选择"运行",在弹出的子菜单中选择"运行"(你也可以使用快捷键F9)。如果一切顺利,你的程序将被编译执行。
4145
4246所有的编译信息都会出现在底部的"消息"窗口中。最终,一个没有刻度标记(编辑状态下才会出现)的Form1窗口将出现在屏幕上。这是你的应用程序的主窗口,它正等着你去按按钮(以及其他操作)。
4347
4448尝试下点击Press按钮,你会发现按钮的标签变成了"Press again"。之后你再怎么按,它依然显示"Press again"。
4549
4650现在点击Exit按钮,窗口将关闭,程序也就终止了。编辑状态下有着丑陋刻度标志的Form1又回到了屏幕上,准备接受更多的修改完善。
4751
4852现在你应该保存你的工作了(你应该经常这么做!),选择顶部主菜单上的" 工程 \> 保存工程 "来保存工程文件。
4953
5054### 第二步
5155
5256再次打开你保存的工程。
5357
5458在Form1窗体上选择Press按钮("Button1")。
5559
5660在"事件"标签中选择OnClick,点击出现的"..."方格,来回到源代码编辑器。
5761
5862按照下面的文本编辑你的代码:
5963
60-` procedure TForm1.Button1Click(Sender: TObject);`\
61-`{这段代码使用了Button1的Tag属性,使Tag属性在0和1之间转换}`\
62-` begin`\
63-`   if Button1.tag =0 then`\
64-`   begin`\
65-`     Button1.caption := 'Press again';`\
66-`     Button1.tag := 1`\
67-`   end else`\
68-`   begin`\
69-`     Button1.caption := 'Press';`\
70-`     Button1.tag := 0`\
71-`   end`\
72-` end;`
64+``` pascal
65+ procedure TForm1.Button1Click(Sender: TObject);
66+{这段代码使用了Button1的Tag属性,使Tag属性在0和1之间转换}
67+ begin
68+ if Button1.tag =0 then
69+ begin
70+ Button1.caption := 'Press again';
71+ Button1.tag := 1
72+ end else
73+ begin
74+ Button1.caption := 'Press';
75+ Button1.tag := 0
76+ end
77+ end;
78+```
7379
7480保存你的工作,重新编译并且运行,Press按钮的标签将会在点击时,在两个不同的文本间来回变换了
7581
7682然后,随便玩吧:\]
7783
7884如果你准备编写控制或者基于文本的Pascal程序(例如你正在使用一份基本的Pascal指南,准备编写在控制台环境下运行的程序,以及为系统底层编程等等),你依然可以使用Lazarus编写,编译并且运行你的程序。Lazarus是一个理想的Pascal开发环境。具体请参照[[Console Mode Pascal]].
7985
8086### 第三步 常用调试方法
8187
8288新人学习不少需要调试的内容
8389
8490所以需要一些直接有效的打印出调试内容.
8591
8692比如像VB 下的 Debug.print 可直接在立即窗口中打印出调试内容
8793
8894其实可以使用
8995
90-` WriteLn('XXXX ', XXX); `
96+```text
97+ WriteLn('XXXX ', XXX);
98+```
9199
92-` Write('XXXXXX');   `
100+```text
101+ Write('XXXXXX');
102+```
93103
94104但是在网上发现不少新人使用会弹出: **project project1 raised exception class 'EInOutError' with <message:file> not open**
95105
96106异常通知
97107
98108只需要在文件头部加入预编译指令
99109
100-` {$APPTYPE CONSOLE}`
110+```text
111+ {$APPTYPE CONSOLE}
112+```
101113
102114这样调试时会弹出一个类dos对话框,输出调试的内容
103115
104116### 第四步 常用技巧
105117
106118lazaurs的编辑器蛮强大的,支持代码补全,自动完成,模板编辑,多行缩进注释,选定代码后批量更改里面的单词!
107119
1081201.代码补全
109121
110122按下键盘的Ctrl+W键!输入变量后按下这个键就OK啦~
111123
1121242.自动完成
113125
114126自动完成的快捷键大多数都冲突了,解决方法是打开 工具(T)-\>选项...-\>编辑器-\>键盘映射-\>CodeTools命令-\>标识符自动完成 上右键 编辑 ,然后根据实际情况修改吧,我的是再勾选Alt,也就是说,我的热键是Ctrl+Alt+Space!不懂的看图
115127
1161283.模板编辑
117129
118130这个也蛮简单,按下键盘的Ctrl+J,然后输入class,回车!是不是很酷!
119131
1201324.多行缩进注释
121133
122134缩进的:向左 -\> Ctrl+U
123135
124136向右 -\> Ctrl+I(选中多行代码更爽)
125137
126138多行注释:Ctrl+/
127139
1281405.选定代码后批量更改里面的单词 先选中一行代码,然后点击编辑器左边显示行号左边的那支笔,看看图哦。
129141
130142这个时候你可以输入b,变量a就全部改为b,还可以按下tab跳到下一个单词。
131143
1321446.编辑器的高亮
133145
134-`<?xml version="1.0"?>`\
135-`<CONFIG>`\
136-` <EditorOptions Version="9">`\
137-`   <Display DoNotWarnForFont="Ubuntu Mono" EditorFont="Ubuntu Mono" EditorFontSize="13">`\
138-`     <MarkupCurrentWord NoKeyword="False"/>`\
139-`   </Display>`\
140-`   <KeyMapping>`\
141-`     <default Count="1">`\
142-`       <Version Value="6"/>`\
143-`       <Item1 Name="Identifier completion">`\
144-`         <KeyA Default="False" Key1="32" Shift1="5"/>`\
145-`       </Item1>`\
146-`     </default>`\
147-`   </KeyMapping>`\
148-`   <CodeTools CodeTemplateFileName="/home/lht/.lazarus/lazarus.dci" CompletionLongLineHintTypeCompletionLongLineHintType="sclpExtendRightOnly" AutoDelayInMSec="104"/>`\
149-`   <Mouse>`\
150-`     <Default Version="1"/>`\
151-`   </Mouse>`\
152-`   <Color Version="9">`\
153-`     <LangObjectPascal Version="9">`\
154-`       <ColorScheme Value="Twilight"/>`\
155-`       <SchemeTwilight>`\
156-`         <Space Background="1973790" FrameColor="5000268" FrameStyle="slsDotted" FrameEdges="sfeBottom"/>`\
157-`         <Number Foreground="7434751"/>`\
158-`         <String Foreground="7337839"/>`\
159-`         <Symbol Foreground="clYellow"/>`\
160-`         <Comment Foreground="clSkyBlue" Style="fsItalic"/>`\
161-`         <Assembler Foreground="11715098"/>`\
162-`         <Directive Foreground="22015"/>`\
163-`         <Case_label Foreground="16541892"/>`\
164-`         <IDE_Directive Foreground="1478752"/>`\
165-`         <Reserved_word Foreground="1023473"/>`\
166-`       </SchemeTwilight>`\
167-`     </LangObjectPascal>`\
168-`     <Globals Version="9">`\
169-`       <SchemeTwilight>`\
170-`         <ahaDefault Background="1973790"/>`\
171-`       </SchemeTwilight>`\
172-`     </Globals>`\
173-`     <LangPython Version="9">`\
174-`       <SchemeTwilight>`\
175-`         <Float Foreground="8345087"/>`\
176-`         <Octal Foreground="16755455"/>`\
177-`         <Number Foreground="8345087"/>`\
178-`         <String Foreground="8388522"/>`\
179-`         <Symbol Foreground="clYellow"/>`\
180-`         <Comment Foreground="clSkyBlue"/>`\
181-`         <Hexadecimal Foreground="8345087"/>`\
182-`         <SyntaxError Foreground="16755285"/>`\
183-`         <Documentation Foreground="16755370"/>`\
184-`         <Reserved_word Foreground="43775"/>`\
185-`         <Non_reserved_keyword Foreground="8366847"/>`\
186-`       </SchemeTwilight>`\
187-`     </LangPython>`\
188-`   </Color>`\
189-`   <Misc PasExtendedKeywordsMode="True"/>`\
190-`   <General>`\
191-`     <Editor TabIndent="True" TabWidth="2"/>`\
192-`   </General>`\
193-`   <DividerDraw>`\
194-`     <LangObjectPascal>`\
195-`       <TypeSect>`\
196-`         <TopColor Value="9157119"/>`\
197-`       </TypeSect>`\
198-`       <TypeGVar>`\
199-`         <TopColor Value="9157119"/>`\
200-`       </TypeGVar>`\
201-`       <TypeGStruct>`\
202-`         <TopColor Value="9157119"/>`\
203-`       </TypeGStruct>`\
204-`       <TypeProc>`\
205-`         <TopColor Value="9157119"/>`\
206-`       </TypeProc>`\
207-`       <TypeLStruct>`\
208-`         <MaxDepth Value="1"/>`\
209-`         <TopColor Value="9157119"/>`\
210-`       </TypeLStruct>`\
211-`     </LangObjectPascal>`\
212-`   </DividerDraw>`\
213-` </EditorOptions>`\
214-`</CONFIG>`
146+```text
147+<?xml version="1.0"?>
148+<CONFIG>
149+ <EditorOptions Version="9">
150+ <Display DoNotWarnForFont="Ubuntu Mono" EditorFont="Ubuntu Mono" EditorFontSize="13">
151+ <MarkupCurrentWord NoKeyword="False"/>
152+ </Display>
153+ <KeyMapping>
154+ <default Count="1">
155+ <Version Value="6"/>
156+ <Item1 Name="Identifier completion">
157+ <KeyA Default="False" Key1="32" Shift1="5"/>
158+ </Item1>
159+ </default>
160+ </KeyMapping>
161+ <CodeTools CodeTemplateFileName="/home/lht/.lazarus/lazarus.dci" CompletionLongLineHintTypeCompletionLongLineHintType="sclpExtendRightOnly" AutoDelayInMSec="104"/>
162+ <Mouse>
163+ <Default Version="1"/>
164+ </Mouse>
165+ <Color Version="9">
166+ <LangObjectPascal Version="9">
167+ <ColorScheme Value="Twilight"/>
168+ <SchemeTwilight>
169+ <Space Background="1973790" FrameColor="5000268" FrameStyle="slsDotted" FrameEdges="sfeBottom"/>
170+ <Number Foreground="7434751"/>
171+ <String Foreground="7337839"/>
172+ <Symbol Foreground="clYellow"/>
173+ <Comment Foreground="clSkyBlue" Style="fsItalic"/>
174+ <Assembler Foreground="11715098"/>
175+ <Directive Foreground="22015"/>
176+ <Case_label Foreground="16541892"/>
177+ <IDE_Directive Foreground="1478752"/>
178+ <Reserved_word Foreground="1023473"/>
179+ </SchemeTwilight>
180+ </LangObjectPascal>
181+ <Globals Version="9">
182+ <SchemeTwilight>
183+ <ahaDefault Background="1973790"/>
184+ </SchemeTwilight>
185+ </Globals>
186+ <LangPython Version="9">
187+ <SchemeTwilight>
188+ <Float Foreground="8345087"/>
189+ <Octal Foreground="16755455"/>
190+ <Number Foreground="8345087"/>
191+ <String Foreground="8388522"/>
192+ <Symbol Foreground="clYellow"/>
193+ <Comment Foreground="clSkyBlue"/>
194+ <Hexadecimal Foreground="8345087"/>
195+ <SyntaxError Foreground="16755285"/>
196+ <Documentation Foreground="16755370"/>
197+ <Reserved_word Foreground="43775"/>
198+ <Non_reserved_keyword Foreground="8366847"/>
199+ </SchemeTwilight>
200+ </LangPython>
201+ </Color>
202+ <Misc PasExtendedKeywordsMode="True"/>
203+ <General>
204+ <Editor TabIndent="True" TabWidth="2"/>
205+ </General>
206+ <DividerDraw>
207+ <LangObjectPascal>
208+ <TypeSect>
209+ <TopColor Value="9157119"/>
210+ </TypeSect>
211+ <TypeGVar>
212+ <TopColor Value="9157119"/>
213+ </TypeGVar>
214+ <TypeGStruct>
215+ <TopColor Value="9157119"/>
216+ </TypeGStruct>
217+ <TypeProc>
218+ <TopColor Value="9157119"/>
219+ </TypeProc>
220+ <TypeLStruct>
221+ <MaxDepth Value="1"/>
222+ <TopColor Value="9157119"/>
223+ </TypeLStruct>
224+ </LangObjectPascal>
225+ </DividerDraw>
226+ </EditorOptions>
227+</CONFIG>
228+```
215229
216230## IDE窗口
217231
218232当你第一次运行Lazarus时,一系列独立的浮动窗口将出现在你的桌面上。
219233
220234首先,在桌面顶部有一个窗口,标题是**Lazarus vxxxx - project**。这是你工程的主要控制窗口,包括主菜单和组件面板。
221235
222236![](/wiki-images/c/c8/Lazarus_IDE_2.0.0-_project1.png)
223237
224238标题栏下面是包括"文件""编辑""查找"等常见项目(以及Lazarus特有的一些项目)的主菜单。
225239
226240主菜单下面,组件面板的左侧是一组按钮,包括了主菜单中的常用项目,例如新建文件,保存等等。
227241
228242在这个窗口下面,左边是**对象查看器**
229243
230244![](/wiki-images/7/7f/%E5%AF%B9%E8%B1%A1%E6%9F%A5%E7%9C%8B%E5%99%A8.png)
231245
232246右边是**源代码编辑器**
233247
234248![](/wiki-images/c/c5/%E6%BA%90%E4%BB%A3%E7%A0%81%E7%BC%96%E8%BE%91%E5%99%A8.png)
235249
236250也许会有一个小窗口覆盖在源代码编辑器上,是Lazarus预置的一个Form1窗体
237251
238252![](/wiki-images/5/56/Form1.png)
239253
240254如果你没有看见它,可以按下F12在源代码编辑器和窗体预览间来回切换。
241255
242256窗体预览展示了应用程序的图形界面,源代码编辑器则显示了应用程序所关联的Pascal代码。对象观察器则展示了组件的更多细节。
243257
244258当你创建一个新工程时(或者第一次运行Lazarus时),一个默认的窗体将被创建。这个窗体包含了一个带有刻度标尺(帮助你定位放置到窗体上的组件)的区域,以及包含常见的"最小化""最大化""关闭窗口"按钮的顶部标签。用鼠标点击这个窗体,左侧的对象观察器将显示这个窗体的属性。
245259
246260在你工作的时候,其他一些窗口也会出现:
247261
248262包含你工程的一些细节,并且允许你从工程中添加或删除文件的**工程查看器**窗口
249263
250264![](/wiki-images/b/b4/%E5%B7%A5%E7%A8%8B%E6%9F%A5%E7%9C%8B%E5%99%A8.png)
251265
252266以及显示编译信息,错误以及运行报告的**信息**窗口
253267
254268![](/wiki-images/4/47/%E4%BF%A1%E6%81%AF.png)
255269
256270如果你从一个终端窗口中运行Lazarus,那么这个原始的终端窗口将被保留,编译信息也会显示在这个终端窗口中。
257271
258272## 主菜单
259273
260274主菜单内容仔细的说明在这里:[[Main menu/zh CN]]
261275
262276## IDE选项
263277
264278在Lazarus 1.0.14版中,通过"工具"-\>"选项",可以打开IDE设置窗口。 在这里你可以对环境、编译器、JCF格式设置、代码工具、代码管理器、调试器、帮助等信息配置。
265279
266280![](/wiki-images/a/a8/IDE%E9%80%89%E9%A1%B9.png)
267281
268282- **环境**
269283 - **文件**:最大记录工程数、文件数及设置Lazarus目录、编译器路径、FPC源代码目录、Make文件目录等等。
270284 - **桌面**:设置IDE语言、自动保存信息等等。
271285 - **窗口**:可对窗口位置、终端输出进行相应设置。
272286 - **窗体编辑器**:对颜色、风格等设置。
273287 - **对象查看器**:对颜色、速度等设置。
274288 - **备份**:工程文件备份设置,其他文件备份设置。
275289 - **命名**:对Pascal后缀、可疑文件动作、自动重命名Pascal文件为小写、单元被重命名,更新引用等等配置。
276290 - **FPDoc编辑器**:配置FPDoc。
277291 - **文件筛选**:对单元、工程、窗体、包、其他文件设置筛选器。
278292
279293- **编辑器**
280294 - **普通**:允许设置撤销/重做次数、滚动方式、缩进与制表符、光标等设置。
281295 - **显示**:设置边界和边缝及默认编辑器字体。
282296 - **键盘映射**:快捷键设置。
283297 - **鼠标**:对鼠标操作进行相应设置。
284298 - **自动化功能**:对自动补充信息进行设置。
285299 - **代码折叠**:对代码折叠相关进行配置。
286300 - **隔离区绘制**:代码块间线条设置。
287301 - **页和Windows**:暂无。
288302
289303- **JCF格式设置**
290304 - **文件格式**:暂无。
291305 - **obfuscate**:暂无。
292306 - **clarify**:暂无。
293307 - **preprocessor**:暂无。
294308
295309- **代码工具**
296310 - **普通**:方法跳转、工程附加源文件路径等设置、pascal源文件缩进设置。
297311 - **类完成**:类、方法部分插入方式及属性自动完成配置。
298312 - **创建代码**:插入过程策略、新单元添加到uses部分等配置。
299313 - **单词**:设置关键字策略、标识符规则及例外等。
300314 - **分割行**:可设置最大行宽、不拆分前面、后面行的条件。
301315 - **空格**:空格插入方式,在关键字、标识符等前或后插入空格。
302316 - **标识符自动完成**:设置标识符自动完成条件,如添加分号时。
303317
304318- **代码管理器**
305319 - **更新**:设置优先表现模式(分类、源代码),自动刷新条件及跟随光标。
306320 - **种类**:设置只在类模式中使用变量、常量、引入、定义等。
307321 - **代码观察器**:对代码观察器进行一些配置。
308322
309323- **调试器**
310324 - **普通**:可设置调试器类型和路径调试器特殊选项等。
311325 - **事件日志**:对消息窗口进行设置,如错误时显示的颜色等。
312326 - **语言异常**:设置忽略哪些异常,如 中止、代码工具错误、Fopen错误。并允许添加忽略。
313327 - **操作系统异常**:设置操作系统异常处理方式。
314328
315329- **帮助**
316330 - **帮助选项**:设置FPC HTML文件路径、默认查看器等。
317331 - **外部**:对外部程序进行配置,如Windows、PostgreSQL、Gtk2配置名称、单元文件及位置。并允许添加外部程序。
318332
319333## 按钮栏
320334
321335![](/wiki-images/d/de/%E6%8C%89%E9%92%AE.png)
322336
323337在主编辑器窗口左侧小工具栏位置,(主菜单下方与左侧组件面板中),包含一组按钮:
324338
325339“新建单元”、“新建窗体”、“打开”、“保存”、“保存所有”、“新窗体”、“切换窗体/单元”、
326340
327341“查看单元”、“查看窗体”、“运行”、“暂停”、“步进”、“下一步”、“运行,直到函数返回”。
328342
329343## 组件面板
330344
331345标签式工具栏里显示常用组件图标。
332346
333347每个选项卡使用一组不同的图标显示,选项卡组最左边的第一个图片(指向箭头),称为选择工具。
334348
335349如果你将鼠标悬停在组件面板中的图标上,将会显示该组件的提示信息。T意味着,Type类型,或者是Class组件。在窗体中,使用组件时,类将会添加到类型和接口处(通常作为TForm1一部分)。实例化处,添加到VAR部分(通常作为Form1变量)。任何方法,设计时要使用窗体或组件(程序或函数),将被放置在implementation部分。如果你要找出某一特定组件的属性,可以看组件的继承,之后检查其派生的基类型的属性。例如,你要了解TMaskEdit,可以查看TcustomMaskEdit。
336350
337351**选项卡**(通过名称可以了解的其包含了哪些组件):
338352
339353- **[标准组件](http://lazarus-ccr.sourceforge.net/index.php?wiki=StdCtrls)**
340354
341355![](/wiki-images/1/1b/Standard.png)
342356
343357
344358*通常使用的组件:* [TMainMenu](http://lazarus-ccr.sourceforge.net/docs/lcl/menus/tmainmenu.html), [TPopupMenu](http://lazarus-ccr.sourceforge.net/docs/lcl/menus/tpopupmenu.html), [TButton](http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tbutton.html), [TLabel](http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tlabel.html), [TEdit](http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tedit.html), [TMemo](http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tmemo.html), [TToggleBox](http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/ttogglebox.html), [TCheckBox](http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tcheckbox.html), [TRadioButton](http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tradiobutton.html), [TListBox](http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tlistbox.html), [TComboBox](http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tcombobox.html), [TScrollBar](http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tscrollbar.html), [TGroupBox](http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tgroupbox.html), [TStaticText](http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tstatictext.html), [TRadioGroup](http://lazarus-ccr.sourceforge.net/docs/lcl/extctrls/tradiogroup.html), [TCheckGroup](http://lazarus-ccr.sourceforge.net/docs/lcl/extctrls/tcheckgroup.html), [TPanel](http://lazarus-ccr.sourceforge.net/docs/lcl/extctrls/tpanel.html), [TActionList](http://lazarus-ccr.sourceforge.net/docs/lcl/actnlist/tactionlist.html)
345359
346360- **[更多组件](http://lazarus-ccr.sourceforge.net/index.php?wiki=ExtCtrls)**
347361
348362![](/wiki-images/2/2a/Additional.png)
349363
350364
351365*更多经常使用的组件:* [TBitBtn](http://lazarus-ccr.sourceforge.net/docs/lcl/buttons/tbitbtn.html), [TSpeedButton](http://lazarus-ccr.sourceforge.net/docs/lcl/buttons/tspeedbutton.html), [TImage](http://lazarus-ccr.sourceforge.net/docs/lcl/extctrls/timage.html), [TShape](http://lazarus-ccr.sourceforge.net/docs/lcl/extctrls/tshape.html), [TBevel](http://lazarus-ccr.sourceforge.net/docs/lcl/extctrls/tbevel.html), [TPaintBox](http://lazarus-ccr.sourceforge.net/docs/lcl/extctrls/tpaintbox.html), [TNotebook](http://lazarus-ccr.sourceforge.net/docs/lcl/extctrls/tnotebook.html), [TLabeledEdit](http://lazarus-ccr.sourceforge.net/docs/lcl/extctrls/tlabelededit.html), [TSplitter](http://lazarus-ccr.sourceforge.net/docs/lcl/extctrls/tsplitter.html), [TMaskEdit](http://lazarus-ccr.sourceforge.net/docs/lcl/maskedit/tmaskedit.html), [TCheckListBox](http://lazarus-ccr.sourceforge.net/docs/lcl/checklst/tchecklistbox.html), [TScrollBox](http://lazarus-ccr.sourceforge.net/docs/lcl/forms/tscrollbox.html), [TApplicationProperties](http://lazarus-ccr.sourceforge.net/docs/lcl/forms/tapplicationproperties.html), [TStringGrid](http://lazarus-ccr.sourceforge.net/docs/lcl/grids/tstringgrid.html), [TDrawGrid](http://lazarus-ccr.sourceforge.net/docs/lcl/grids/tdrawgrid.html), [TPairSplitter](http://lazarus-ccr.sourceforge.net/docs/lcl/pairsplitter/tpairsplitter.html)
352366
353367- **[公共组件](http://lazarus-ccr.sourceforge.net/index.php?wiki=ComCtrls)**
354368
355369![](/wiki-images/e/e5/Commoncontrols.png)
356370
357371
358372TTrackBar, TProgressBar, TTreeView, TListView, TStatusBar, TToolBar, TUpDown, TPageControl, TImageList
359373
360374- **[对话框组件](http://lazarus-ccr.sourceforge.net/index.php?wiki=DialogsTxt)**
361375
362376![](/wiki-images/b/bf/Dialogs.png)
363377
364378
365379TOpenDialog, TSaveDialog, TSelectDirectoryDialog, TColorDialog, TFontDialog, TOpenPictureDialog, TSavePictureDialog, TCalendarDialog, TCalculatorDialog
366380
367381有几个有用的**[对话框](http://lazarus-ccr.sourceforge.net/index.php?wiki=DialogExamples)**,它不在组件面板中显示,但在你可在过程函数中直接调用。
368382
369383有关组件使用的例子,请参看\$LazarusPath/lazarus/examples目录。许多程序不使用IDE组件而直接使用对话框或其他组件的调色板,或者有一个单独的窗体定义文件:所有组件中,在Pascal主程序部分定义使用。
370384
371385一些示例,不马上使用的:你可能需要调整路径和文件(目录)的执行权限。如果你想直接编译示例,请确保对文件(目录)具有读取/写入/执行权限。
372386
373387请尝试运行**testall程序**,以查看可用组件和示例菜单,大多数的测试,可以确定你的环境是否能够正常使用这些组件!
374388
375389- **杂项组件**
376390
377391![](/wiki-images/3/3d/Misc.png)
378392
379393
380394[TColorButton](http://lazarus-ccr.sourceforge.net/index.php?wiki=DialogsTxt), TSpinEdit, TArrow, TCalendar, TEditButton, TFileNameEdit, TDirectoryEdit, TDateEdit, TCalcEdit, TFileListBox
381395
382396- **数据组件**
383397
384398![](/wiki-images/8/8a/Datacontrols.png)
385399
386400
387401*数据组件,通常用于数据库:* TDBNavigation, TDBText, TDBEdit, TDBMemo, TDBImage, TDBListBox,TDBComboBox, TDBCheckBox, TDBRadioGroup, TDBCalendar, TDBGroupBox, TdbGrid
388402
389403- **数据访问组件**
390404
391405![](/wiki-images/9/94/Dataaccess.png)
392406
393407
394408TDatasource
395409
396410- **系统组件**
397411
398412![](/wiki-images/8/85/System.png)
399413
400414
401415[TTimer](http://lazarus-ccr.sourceforge.net/index.php?wiki=ExtCtrls#TTimer), TIdleTimer, [[doc:fcl/process/tprocess.html|TProcess]]
402416
403417- **SynEdit(~~编辑器组件~~)**
404418
405419![](/wiki-images/3/36/Synedit.png)
406420
407421
408422*SynEdit是一个高级的文本编辑器控制,对Borland的Delphi,Kylix、C++Builder等支持语法高亮和代码自动完成,并支持输出为HTML、Tex和RTF。这是一个VCL/CLX控件,意味着,适用于Microsoft的Windows,没有信赖的运行库,SynEdit作为跨平台组件,也是Lazarus IDE中的编辑器组件。* 查看 [sourceforge上的synedit](http://synedit.sourceforge.net). TSynEdit, TSynAutoComplete, TSynExporterHTML, TSynMacroRecorder, TSynMemo, TSynPasSyn, TSynCppSyn, TSynJavaSyn, TSynPerlSyn, TSynHTMLSyn, TSynXMLSyn, TSynLFMSyn, TSynUNIXShellScriptSyn, TSynCssSyn, TSynPHPSyn, TSynTeXSyn, TSynSQLSyn, TSynMultiSyn
409423
410424要使用调色板,必须存在窗体(如果没有,选择文件-\>新建窗体)。单击调色板中需要使用的控件,在窗体上单击,这时候,窗体上,将显示出来调色板组件;你可以调整它到合适的位置,通过属性可以显示外观。
411425
412426如果你想安装额外的组件,无论是你自己编写的,还是第三方的;完成后,将在组件面板中显示出来。
413427
414428## 如何使用通用控件
415429
416430**StdCtrls**、**ComCtrls**和**ExtCtrls**包含了常用控件的构建形式及Lazarus应用程序中常用对象。
417431
418432许多控件应用程序开发人员都要使用,如**TButton**、**TMemo**、**TScrollBar**等等。声明的控件都继承自父类。
419433
420434使用这些控件时,你可以选择相应控件,在窗体上拖放就可以了。也可以使用代码创建,但是,在你不需要时,你需要销毁它。
421435
422436#### 设置属性
423437
424438在窗体设计器上放置控件后,在对象检查器中,你可以设置控件属性或编写相应事件代码。
425439
426440如,你在窗体上放置了一个按钮(TButton),选择它,并移动它以改变位置,你会可以看到它的top和left值的变化。在对象观察器中Height、Width值分别代表其大小高度和宽度。
427441
428442此外,你可以使用代码来改变对象属性:
429443
430444`Form1.Button1.Height := 48;`
431445
432446在FormCreate过程中书写上面的代码,程序运行时,将看到效果。
433447
434448总之,有三种方法,可以设置对象的属性:
435449
436450- 通过鼠标在窗体上调整
437451- 通过设置对象观察器中的值
438452- 通过代码来设置属性
439453
440454#### 公共属性
441455
442456每个组件(控件)都有不同的属性,有某些是相同的,常见的,下面这介绍这些常用属性:
443457
444458通过选择属性或关键字,在对象观察器或源代码编辑器中按`F1`来获得帮助。
445459
446460如果该页面上的属性描述不够,您可以通过选择继承列表中的链接或在对象声明中选择祖先类型来导航到相应的祖先类别描述。
447461
448-常用属性
462+```text
463+ <caption><b>常用属性</b></caption>
464+```
449465
450466属性
451467
452468说明
453469
454470介绍
455471
456472Action
457473
458474行动
459475
460476与对象关联的主要动作或事件。如,在选择“退出”时,会导致“关闭”。
461477
462478Align
463479
464480对齐
465481
466482定义与父对象对齐方式。alTop:顶对齐;alBottom:底对齐;alLeft、alRight:左对齐和右对齐;alNone:无;alClient:占用父对象所有空间。
467483
468484Anchor
469485
470486锚
471487
472488用于保持控件的父控件;当父控件调试大小将调整与其距离。\[akBottom,akRight\]将保持固定在父控制右下角距离。
473489
474490AutoSelect
475491
476492自动选择
477493
478494为True时,控件在获取到焦点,或当按下`Enter`键时选择所有文本。
479495
480496AutoSelected
481497
482498自动选中
483499
484500True表示编辑框或组合框控件刚刚执行了“自动选择”操作,因此随后的鼠标点击和按键操作将正常进行而不会选中文本。
485501
486502BorderSpacing
487503
488504边框间距
489505
490506**锚定**控件与其父级之间的边缘空间。
491507
492508Caption
493509
494510标题
495511
496512设置显示内容,如按钮标题为“关闭”或“执行”。默认情况下,标题名称与Name属性值相同。
497513
498514CharCase
499515
500516字符显示
501517
502518设置字母在编辑控件中显示方式:Normal:正常(不改变字母大小写);ecLowerCase:转换为小写;ecUppercase:转换为大写。
503519
504520Constraints
505521
506522限制
507523
508524设置控件最大、小、高、宽度。如果调整控件大小,新的大小将在此范围内。You should take care when setting these options that they do not conflict with the Anchors and Align settings.
509525
510526Color
511527
512528颜色
513529
514530设置控件的文本颜色。
515531
516532Enabled
517533
518534启用
519535
520536设置控制是否可用,如果为False,在窗体上显示为灰色。
521537
522538Font
523539
524540字体
525541
526542设置对象的字体信息,通常(+)号展开详细,如字体、字号、颜色等。
527543
528544Hint
529545
530546提示
531547
532548鼠标悬停在控件上时,弹出的提示信息。请注意ShowHint属性为True时才显示。
533549
534550Items
535551
536552项目
537553
538554包含的数据信息,如果文本行等。
539555
540556Lines
541557
542558列表
543559
544560字符串数组,包含单个数据,数组为索引从0开始,即\[0..numLines-1\]。
545561
546562Name
547563
548564名称
549565
550566设置控件的标识符。如TBitButton的实例,为Form1.BitBitton1、Form1.BitButton2等等,程序员应该使用见名真义的名称,如ExitButton(退出按钮)或OKButton(确定按钮)。
551567
552568PopUpMenu
553569
554570弹出式菜单
555571
556572设置在控件上右击时,弹出的菜单。
557573
558574Position (or Top, Left)
559575
560576位置
561577
562578设置控件位置。
563579
564580ReadOnly
565581
566582只读
567583
568584为True时,控件只能被读取,不能被更改。如Edit。
569585
570586ShowHint
571587
572588显示提示
573589
574590设置鼠标'悬停'在控件上时,是否显示提示信息。
575591
576592Size (or Height and Width)
577593
578594大小
579595
580596设置控件尺寸。
581597
582598Style
583599
584600样式
585601
586602样式的选项取决于所考虑的控件类型:例如,样式可以由TFormStyle、TBorderStyle、TButtonStyle等定义。
587603
588604TabOrder
589605
590606Tab键顺序
591607
592608输入整数,设置`Tab`的顺序。
593609
594610TabStop
595611
596612制表位
597613
598614为False时,`Tab`将无法选中此控件,否则可以。
599615
600616Text
601617
602618文本
603619
604620字符串文本,表示该控件包含的数据。适用于Text、Memo、StringList类型。Most of the editing operations (such as **Select**, **Clear**, **Cut**, **Copy**) are performed in this part of the object, which holds the actual string being edited. If the control contains more than a single line of text, for example **TMemo** or **TComboBox**, then the textual elements are arranged as an array of strings (zero-indexed, ie numbered from \[0..numLines-1\]) in **Lines**.
605621
606622Visible
607623
608624可见
609625
610626为True,在窗体中可以看到此控件,否则将隐藏。
611627
612628WordWrap
613629
614630自动换行
615631
616632为True时,文本内容将自动换行。
617633
618634#### 事件动作
619635
620636许多行动通常列在“对象观察器”中的“事件”选项卡里。在列表中选择相应事件,在下拉列表中将会显示你已经定义的方法,并允许你对其关联。点击旁边的"..."按钮,将跳到源代码编辑器里,你在那里可以编写相应程序。
621637
622638“事件“选项卡中,显示了当前控件支持的事件,像OnClick事件:鼠标点击事件;OnEntry:当获得焦点时;OnExit:当失去焦点时;或者你可以编写:OnChange:内容改变时;或OnScroll:在滚动条上操作时等等,根据你的需要来选择使用哪些事件进行哪些操作。
623639
624640在窗体设计器上右击控件 ,“创建默认的事件“也有相同的效果,通常是OnClick(点击)事件。之后在源代码编辑器里编写相应操作。
625641
626642在面向对象程序设计中,使用 TActionList 组件是为了集中处理许多常用的操作,把用户界面和应用逻辑分开,减少程序的代码行数,方便程序的维护和调试。它用于维护一系列动作列表,以供其他组件或控制所使用,如菜单和按钮。
627643
628-常用事件
644+```text
645+ <caption><b>常用事件</b></caption>
646+```
629647
630648事件
631649
632650说明
633651
634652介绍
635653
636654OnChange
637655
638656改变事件
639657
640658当检测到任何更改(如鼠标移动、点击、按键、编辑文字、更改图片等)都将触发此事件。
641659
642660OnClick
643661
644662点击事件
645663
646664鼠标点击时触发此事件(点击,指的是鼠标左键点击),点击事件大多是控件默认的事件,如点击一个按钮、单选框或复选框。
647665
648666单击方法
649667
650668Click
651669
652670单击方法
653671
654672单击方法,在代码中模拟点击控件。一个程序可以调用相同代码的OnClick事件,通过点击激活其他事件。这个方法可以在程序启动时使用,而不是用户点击后再进行某些操作。
655673
656674OnDragDrop
657675
658676拖放事件
659677
660678拖放操作之前,即当鼠标选中某些信息(如文本)要移动到新位置时。
661679
662680OnEditingDone
663681
664682编辑完成事件
665683
666684当用户完成编辑/修改时,通常用来验证输入内容,如检测输入的文本是不是有效的IP地址。
667685
668686OnEntry
669687
670688获得焦点事件
671689
672690当控件获取到焦点时,触发此事件。
673691
674692OnExit
675693
676694移出事件
677695
678696当鼠标移出控件区域时触发此事件。
679697
680698OnKeyPress
681699
682700按键事件
683701
684702按键事件,当按下某键时,将触发此事件。不同于OnKeyDown:当按下但不松开某键时触发此事件。
685703
686704OnKeyDown
687705
688706按下键不松事件
689707
690708如果一个键被按下,但不松开,将触发此事件。
691709
692710OnKeyUp
693711
694712松开键事件
695713
696714松开按键时触发此事件。
697715
698716OnMouseMove
699717
700718鼠标移动事件
701719
702720当鼠标在控件上移动时触发此事件。
703721
704722OnMouseDown
705723
706724鼠标按下事件
707725
708726鼠标按下但不松开时触发此事件。
709727
710728OnMouseUp
711729
712730鼠标松开事件
713731
714732鼠标按下并松开时触发此事件。
715733
716734OnResize
717735
718736改变大小事件
719737
720738调整控件大小时触发此事件。
721739
722740#### 构造和析构函数
723741
724742每个对象都有两个相关联的方法:
725743
726744- **构造函数**:在创建时,即分配对象所需内存和资源时。
727745- **析构函数**:在删除时,即释放分配对象所需内存和资源时。
728746
729747释放对象,你需要使用free方法,因为它会检测对象值是否为nil。如果你调用已经*销毁*的对象,它将产生一个错误。
730748
731749*销毁*时,注意以下:
732750
733751- Declare **Destroy** with the override directive, because it is a virtual method.
734752- Always call **'inherited Destroy;**' as the last thing on the destructor code.
735753- Be aware that an **exception** may be raised on the **constructor** in case there is not enought memory to create an object, or something else goes wrong. If the **exception** is not handled inside the constructor, the object will be only partially built. In this case **Destroy** will be called when you weren't expecting it, so your destructor must check if the resources were really allocated before disposing of them.
736754- Remember to call **Free** for all objects created on the constructor.
737755
738756## 为窗体创建菜单
739757
740758*TMainMenu*是大多都使用的;在窗体顶部会出现菜单栏,设计者可以定制不同的菜单项。*TPopupMenu*是一个与上下文相关的菜单。通常是在控件附近点击时弹出的。
741759
742760主菜单是非可视组件:也就是说,在组件面板中选择菜单图标,放置在窗体上,运行时不会被显示,你需要创建菜单项,像TPopupMenu菜单,你需要关联相应组件的PopupMenu属性。
743761
744762若要使用菜单编辑器:右击窗体上的菜单控件,在弹出的菜单中选择*(Menu Editor)菜单编辑器*,在弹出的窗口中,对菜单进行设置。
745763
746764默认将显示一个NewItem1菜单项,右击它,弹出的菜单中,你可以继续在其上面或下面添加菜单,也可以子菜单。在对象观察器中,设置菜单项属性。
747765
748766当然,你应该给菜单项起个有意义的名字,如File open(打开文件)、Close(关闭)等。 如果你想热键,即在菜单项后显示(&N),你只需要直接输入即可。当然,你也可以给菜单项关联快捷键,对象观察器中的ShortCut和ShortCutKey2属性,分别设置第1,2快捷键;如(复制,`Ctrl`+`C`;粘贴,`Ctrl`+`V`)。
749767
750768另外,如需要在菜单项间插入一条分隔线,只需要设置菜单项的Caption属性为**-**即可。
751769
752770你可以结合ActionList组件,对菜单各项的事件进行统一编写。
753771
754772By default, a number of standard actions are pre-loaded from *StdActns* or, if DataAware controls are used, from *DBActns*. These actions can be chosen using the ActionList editor which appears when you right-click on the ActionList icon on the Form Designer.
755773
756774## 调试器
757775
758-*`待写`*`。`
776+```text
777+待写。
778+```
759779
760780更多 [:category: IDE Window - Debug](/wiki-category/IDE%20Window%20-%20Debug)
761781
762782## Lazarus 文件
763783
764-`   (感谢 Kevin Whitefoot.)`\
765-`   (Giuseppe Ridinò, `User:Kirkpatc` 和 Tom Lisjac 添加)`
784+```text
785+ (感谢 Kevin Whitefoot.)
786+ (Giuseppe Ridinò, User:Kirkpatc 和 Tom Lisjac 添加)
787+```
766788
767789当你保存时,实际上会保存两个文件:
768790
769-`  xxx.pas 和 yyy.lpr`
791+```text
792+ xxx.pas 和 yyy.lpr
793+```
770794
771795不止这些,还有项目文件(lpr)、单元文件(pas),名称不能相同,否则Lazarus会覆盖掉原文件,在编辑器会因为无法找到指定文件而报错。
772796
773797所以,你需要保存为一个不重名的项目。
774798
775799这是我最终的文件列表:
776800
777801e:/lazarus/kj/lazhello:
778802
779-`total 4740  free 76500`\
780-`-rwxrwxrwx   1 kjwh     root  4618697 Mar 24 11:19 again.exe`\
781-`-rw-rw-rw-   1 kjwh     root     3002 Mar 24 11:21 again.lpi`\
782-`-rw-rw-rw-   1 kjwh     root      190 Mar 24 11:18 again.lpr`\
783-`-rw-rw-rw-   1 kjwh     root      506 Mar 24 11:08 againu.lfm`\
784-`-rw-rw-rw-   1 kjwh     root      679 Mar 24 11:08 againu.lrs`\
785-`-rw-rw-rw-   1 kjwh     root      677 Mar 24 11:08 againu.pas`\
786-`-rw-rw-rw-   1 kjwh     root     2124 Mar 24 11:08 againu.ppu`\
787-`-rwxrwxrwx   1 kjwh     root      335 Mar 24 11:07 ppas.bat`
803+```text
804+total 4740 free 76500
805+-rwxrwxrwx 1 kjwh root 4618697 Mar 24 11:19 again.exe
806+-rw-rw-rw- 1 kjwh root 3002 Mar 24 11:21 again.lpi
807+-rw-rw-rw- 1 kjwh root 190 Mar 24 11:18 again.lpr
808+-rw-rw-rw- 1 kjwh root 506 Mar 24 11:08 againu.lfm
809+-rw-rw-rw- 1 kjwh root 679 Mar 24 11:08 againu.lrs
810+-rw-rw-rw- 1 kjwh root 677 Mar 24 11:08 againu.pas
811+-rw-rw-rw- 1 kjwh root 2124 Mar 24 11:08 againu.ppu
812+-rwxrwxrwx 1 kjwh root 335 Mar 24 11:07 ppas.bat
813+```
788814
789815Note that there are many more files than the two that I thought I was saving.(~~注意,好像是多了两个文件,我想是我存的吧。~~)
790816
791817下面是对每个文件的简短介绍:
792818
793819**again.exe:** 二进制可执行文件,Win32中添加exe扩展名。linux没有。此文件在Linux上很大的原因是,加入了调试标记。 注意:在1.0.14版,可以勾选,“工程”-\>“工程选项”中的“编译选项”-\>“链接”:“从可执行程序中除去符号,可以减少程序体积(Strip Symbol)”;以减少程序体积。
794820
795821**again.lpi:** 它以XML格式存储,是Lazarus项目的主要文件(项目信息);Delphi应用程序文件是.dpr。
796822
797823**again.lpr:** 这是主程序的源代码文件,尽管使用了特定的扩展名,但它仍是正常的Pascal源文件。它有use部分,可以让编译器找到所需的单元。注意,程序名可以和该名称相同。
798824
799825**againu.lfm:** 存储了Lazarus窗体布局信息;也包含了初始化部分的资源文件。Delphi的DFM文件可以转换为LFM格式:“工具“-\>“转换DFM文件为LFM文件”。
800826
801827**againu.lrs:** 生成的资源文件。需要注意的是它不是Windows的资源文件。
802828
803829**againu.pas:** The unit that contains the code for the form. 包含窗体代码的单元文件。
804830
805831**againu.ppu:** 编译的单元文件。
806832
807833**ppas.bat:** 一个简单的脚本,链接程序生成可执行文件。如果编译完成,将由编译器删除。
808834
809835## 原作者和变化
810836
811837这个页面来自 ~~[这里](http://lazarus-ccr.sourceforge.net/index.php?wiki=LazarusTutorial)~~(失效)。
812838
813839- Created initial page and template. T. Lisjac - 11/04/2003 VlxAdmin
814840- Inserted a note containing instructions for writing your first Lazarus Program. Suggest an administrator places it in the appropriate place on the Tutorial menu. 3/09/2004 User:Kirkpatc
815841- Per above, moved Chris's writeup to the main body of the tutorial VlxAdmin
816842- Began to insert text describing the Lazarus Editor - more to follow! 24 Mar 2004 User:Kirkpatc
817843- Added some more to Lazarus Editor section of Tutorial. 25 Mar 2004 User:Kirkpatc
818844- Added screenshots and revised some of the page formatting VlxAdmin 3/25/2004
819845- Moved some of kwhitefoot's comments into Tutorial section. Formatting not quite right, but have to go to bed now! 26 Mar 2004 User:Kirkpatc
820846- Formatted, added credits and comments. Removed original notes. VlxAdmin 3/26/2004
821847- More material added to Editor section of tutorial. 26 Mar 2004 User:Kirkpatc
822848- More material added describing the Main Menu. Renamed 'Hello World' to 'Getting Started' and moved it to nearer the top. 31 March 2004 User:Kirkpatc
823849- Inserted section on Run sub-menu. Some general editing (eg ended each entry with a period to ensure consistency). 9 Apr 2004 User:Kirkpatc
824850- Inserted a new section on How to get started with MySQL in FPC/Lazarus. 13 Apr 2004 User:Kirkpatc
825851- Deleted the section on MySQL from here: it has been copied to Lazarus Database section of tutorial. 14 Apr 2004 User:Kirkpatc
826852- Added some more to the description of the Editor Main Menu. 18 Apr 2004 User:Kirkpatc
827853- Added section on Environment sub-menu. 19 Apr 2004 User:Kirkpatc
828854- Added section on Components sub-menu. 4 May 2004 User:Kirkpatc
829855- Adding Tools sub-menu description (incomplete). 7 May 2004 User:Kirkpatc
830856- Added some screenshots to Menu descriptions. 9 May 2004 User:Kirkpatc
831857- Fixed a bit in Environment Options - thanks VincentSnijders. 14 May 2004 User:Kirkpatc
832858- More additions to Tools sub-menu. 19 May 2004 User:Kirkpatc
833859- Added a section on the Button Bar and started work on The Component Palette. 20 May 2004 User:Kirkpatc
834860- Posted a description file for the StdCtrls unit of the LCL, in the hope that people will add comments. 26 May 2004 User:Kirkpatc
835861- Edited the StdCtrls file, removing a lot of repetitive material and doing some formatting. It is still far too long. 28 May 2004 User:Kirkpatc
836862- Expanding on the Components Palette. 5 June 2004 User:Kirkpatc
837863- Added a lot to the DialogExamples page. 10 June 2004 User:Kirkpatc
838864- Considerable revision of the StdCtrls page, hopefully making it clearer and encouraging people to contribute - particularly in the 'Description' sections. 14 June 2004 User:Kirkpatc
839865- Added pages for Menus and Dialogs units (linked to Component Palette description) - please feel free to add to these pages. 14 June 2004 User:Kirkpatc
840866- Added page for Common Controls (linked to Component Palette). 16 June 2004 User:Kirkpatc
841867- Added MaskEdit page (linked to Component Palette). 17 June 2004 User:Kirkpatc
842868- Added Buttons, ExtCtrls pages (linked to Component Palette). 17 June 2004 User:Kirkpatc
843869- Edited MainMenu component description page. 23 June 2004 User:Kirkpatc
844870- Some additions to Common Controls. 28 June 2004 User:Kirkpatc
845871- A new tutorial on Text-mode Pascal programming has been added. 5 July 2004 User:Kirkpatc
846872- Minor changes to ComCtrls, ExtCtrls, Environment Menu. 10 July User:Kirkpatc
847873- Added FormsTxt, component description page for Component Palette. 20 July 2004 User:Kirkpatc
848874- Some corrections to ConsoleModePascal. 21 July 2004 User:Kirkpatc
849875- Some small changes to ComponentPalette. 22 July 2004 User:Kirkpatc
850876- Returned after a long absence! Changed link for component descriptions in StdCntls group of ComponentPalette to point directly at the Lazarus on-line help html pages. 25 Sept 2007 User: Kirkpatc
851877- Uploaded some more up-to-date screenshots and fixed links in descriptions of the Menus. 2 October 2007 User: Kirkpatc
852878- Fixed links for component descriptions in Extra Controls section of Component Palette. 2 October 2007 User: Kirkpatc
853879- Uploaded some more up-to-date screenshots,and fix some more up-to-date item. 12 October 2018 User: robsean
854880- Uploaded some more up-to-date screenshots,and fix some more up-to-date item. 15 February 2019 User: robsean
855881
856882---
857883*From the Free Pascal wiki, page "Lazarus Tutorial/zh CN", as it stood on 2023-03-31 after a change by Owenlmg, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
858884Category: zh

Back to history