Sign in Join
Wiki copytemporary

Lazarus Tutorial/fr: what changed

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

OldNewLine
11*Ceci est le début du Tutoriel Lazarus. N'hésitez pas à y ajouter vos expériences.*
22
33## Vue d'ensemble
44
55Lazarus est un outil de développement libre et open source dédié au compilateur FreePascal (Pascal objet). FreePascal est également libre et open source. L'environnement de Développement Intégré (EDI) Lazarus ([[Screenshots|capture d'écran en Anglais]]) est stable. Il a de nombreuses fonctionnalités pour créer des logiciels pouvant s'exécuter de façon autonome. Il fonctionne actuellement sous Linux, FreeBSD, Win32 et macOS. Lazarus fournit un éditeur de code source personnalisable, un environnement visuel de création de fiches, un gestionnaire de paquets, un débogueur et une interface graphique utilisateur (GUI) intégrée au compilateur FreePascal.
66
77## Prise en main
88
99(Merci à User:Kirkpatc)
1010
1111Téléchargez Lazarus dans la section 'Download' du [site officiel](http://www.lazarus.freepascal.org), [[Installing Lazarus/fr|installez-le]] et lancez-le.
1212
1313### Votre premier programme sous Lazarus !
1414
1515Plusieurs fenêtres apparaîtront sur le bureau : le menu principal en haut, l'inspecteur d'objet à gauche, l'éditeur de source de Lazarus, qui occupe la plus grande partie du bureau, et une fenêtre Form1 prête à être utilisée recouvrant l'éditeur de source.
1616
1717Sous le menu principal, vous trouverez plusieurs onglets. Si 'Standard' n'est pas déjà sélectionné, faites-le en cliquant dessus avec la souris et cherchez une icône représentant un bouton (un rectangle avec 'OK' marqué dessus), sélectionnez-le avec la souris. Ensuite cliquez sur la fenêtre 'Form1'. Un rectangle ayant pour texte 'Button1' apparaîtra. Cliquez une nouvelle fois sur l'icône du bouton dans l'onglet 'Standard', et cliquez de nouveau sur Form1 : un rectangle ayant pour texte 'Button2' apparaîtra.
1818
1919Maintenant cliquez sur 'Button1' pour le sélectionner. L'inspecteur d'objet affichera les propriétés de l'objet 'Button1'. Elles sont triées par ordre alphabétique, cherchez 'Caption' elle devrait afficher la valeur 'Button1'. Cliquez dessus et changez 'Button1' en 'Press'. Si vous appuyez sur la touche ENTREE de votre clavier ou cliquez ailleurs, vous verrez le libellé de votre premier bouton de 'Form1' se changer en 'Press'. Ensuite cliquez sur l'onglet 'Événements' de l'inspecteur d'objet, pour voir les différents événements pouvant être associés au bouton. Cela inclut OnClick, OnEnter, OnExit etc. À présent, cliquez sur le bouton à droite de 'OnClick' \[...\]. Lorsque vous le sélectionnez, vous êtes renvoyés automatiquement dans l'éditeur de source, et votre curseur directement à l'emplacement où le code doit être saisi :
2020
2121``` pascal
2222 procedure TForm1.Button1Click(Sender: TObject);
2323 begin
2424 {maintenant tapez :} Button1.caption := 'Press again';
2525 {L'éditeur a déjà complété la procédure }
2626 end;
2727```
2828
2929Appuyez sur F12 pour sélectionner Form1 au lieu de l'éditeur de source.
3030
3131Maintenant, éditez les propriétés de 'Button2' : cliquez sur 'Button2' pour afficher ses propriétés dans l'inspecteur d'objet. Changez la propriété 'Caption' en 'Exit' au lieu de 'Button2'. Maintenant, sélectionnez l'onglet 'Événements', et cliquez sur 'OnClick'. Cliquez ensuite sur le bouton figurant 3 points \[...\], une nouvelle procédure sera automatiquement déclarée et le curseur sera positionné directement dans le corps de celle-ci :
3232
3333``` pascal
3434 procedure TForm1.Button2Click(Sender: TObject);
3535 begin
3636 {maintenant tapez :} Close;
3737 {L'éditeur a déjà complété la procédure }
3838 end;
3939```
4040
4141Maintenant, appuyez sur F12 pour revoir la fenêtre 'Form1'. Vous êtes maintenant prêt à compiler votre programme. La méthode la plus simple est de sélectionner 'Exécuter' dans le menu principal en haut de l'écran, et l'option 'Exécuter' dans le sous menu. Vous pouvez aussi appuyer, tout simplement, sur la touche F9 de votre clavier. Cette manipulation compilera votre programme, et (si tout se passe bien) l'exécutera.
4242
4343La fenêtre de texte en dessous de l'éditeur de source affichera différentes sortes d'informations sur la compilation (information, alerte, erreur...). Quelques instant plus tard, 'Form1' va réapparaître, mais sans la grille de points qui permet de positionner les composants (boutons, zones de saisie) en mode conception. C'est le fenêtre principale de votre application, elle attend que vous cliquiez sur le bouton 'Press'.
4444
4545Essayez de cliquer sur le bouton 'Press'. Le libellé changera en 'Press again'. Si vous cliquez encore, le libellé continuera à afficher 'Press again' !
4646
4747Maintenant, cliquez sur le bouton marqué 'Exit'. La fenêtre se fermera et vous quitterez le programme. La fenêtre 'Form1' originale réapparaîtra en mode conception avec sa grille de points, prête à être modifiée de nouveau.
4848
4949A présent, vous devriez sauvegarder votre travail (faites-le souvent !) sélectionnez : Projet -\> Enregistrer le projet sous... et indiquez les noms de vos fichiers.
5050
5151ATTENTION : le nom de fichier de la "Unit" et du projet doivent être différents.
5252
5353### Deuxième session
5454
5555Rouvrez votre projet. Cliquez sur le bouton 'Press' (Button1) de la fenêtre 'Form1'. Sélectionnez l'onglet 'Évènements' dans l'inspecteur d'objet, cliquez sur le bouton près de 'OnClick' \[...\], pour retourner à l'emplacement approprié dans l'éditeur de source.
5656
5757Modifiez votre code de la manière suivante :
5858
5959``` pascal
6060 procedure TForm1.Button1Click(Sender: TObject);
6161 {Makes use of the Tag property, setting it to either 0 or 1}
6262 begin
6363 if Button1.tag = 0 then
6464 begin
6565 Button1.caption := 'Press again';
6666 Button1.tag := 1
6767 end else
6868 begin
6969 Button1.caption := 'Press';
7070 Button1.tag := 0
7171 end
7272 end;
7373```
7474
7575Sauvegardez votre travail, et compilez votre programme. Le bouton 'Press' basculera entre les deux messages ('Press' et 'Press again').
7676
7777Le reste dépend de vous !
7878
7979Si vous préférez programmer en mode console (ou mode texte), par exemple si vous apprenez les bases du Pascal, ou que vous ayez besoin d'un programme de traitement par lots (batch) ou encore que vous souhaitiez faire de la programmation système, vous pouvez conserver Lazarus pour éditer, compiler et exécuter votre programme. Il constitue un environnement idéal pour le développement en Pascal. Voir [[Console Mode Pascal]].
8080
8181## L'éditeur
8282
8383Lorsque vous lancez Lazarus, une série de fenêtres flottantes apparaît.
8484
8585La fenêtre principale en haut de l'écran est titrée **Editeur Lazarus vXXXXXX - project1** (les X correspondent au numéro de la version de Lazarus installée sur votre machine). C'est une fenêtre importante de votre projet, elle contient le menu principal et la palette de composants.
8686
8787![](/wiki-images/f/f5/Lazmainfr.jpg)
8888
8989Sur la ligne juste en dessous du titre se trouve le "Menu principal" avec les entrées habituelles : Fichier, Edition, Chercher, Voir... et d'autres qui correspondent à des fonctions spécifiques à Lazarus. En dessous à gauche vous trouverez un jeu de "BitButtons" qui vous permettrons d'accéder aux fonctions les plus courantes. A droite se trouve la palette de composants.
9090
9191En dessous de la fenêtre de l'éditeur apparaît, à gauche de l'écran, la fenêtre de l**'[inspecteur d'objet](http://lazarus-ccr.sourceforge.net/kbdata/objinsp.jpg)**, et l**'[éditeur de source de Lazarus](http://lazarus-ccr.sourceforge.net/kbdata/editor.jpg)**. Il peut également y avoir une fenêtre plus petite, appelée **[Form1](http://lazarus-ccr.sourceforge.net/kbdata/blankform.jpg)**, recouvrant l'éditeur de source de Lazarus. Si 'Form1' n'est pas visible immédiatement, vous pouvez la faire apparaître en pressant **F12**, qui basculera de l'éditeur de source au formulaire correspondant à l'unité en cours, et inversement. La fenêtre de conception de formulaire et l'un des outils que vous utiliserez le plus fréquemment pour mettre en place une interface utilisateur pour votre application. Ce qu'il est possible de faire dans l'inspecteur d'objet est décrit plus en détail dans la section : Palette de composants.
9292
9393Lorsque vous démarrez un nouveau projet, ou que vous lancez Lazarus pour la première fois, un formulaire par défaut apparaît. Ce formulaire consiste en une "boîte" contenant une grille de points qui vous aiderons à positionner les différents composants, une barre au sommet de la fenêtre contient les boutons habituels **Réduire**, **Agrandir** et **Fermer**. Si vous cliquez avec le curseur de la souris à l'endroit que vous voulez dans la boîte, vous verrez les propriétés du formulaire s'afficher dans l'inspecteur d'objet à gauche de l'écran.
9494
9595D'autres fenêtres peuvent êtres affichées pendant votre travail : l**'[inspecteur de projet](http://lazarus-ccr.sourceforge.net/kbdata/projinsp.jpg)** contient les détails des fichiers inclus dans votre projet, et vous permet également d'en rajouter ou d'en supprimer. La fenêtre de **Messages**, affiche les informations de compilation, les erreurs ou les rapports d'avancement ; si Lazarus est lancé depuis une fenêtre de terminal, le terminal original reste toujours visible et affiche également des messages de compilation.
9696
9797### Menu principal
9898
9999Le menu principal contient les entrées suivantes : Fichier Edition Cercher Voir Project Exécuter Composants Outils Configuration Fenêtres Aide
100100
101101Comme d'habitude, les options peuvent êtres sélectionnées soit en cliquant directement dessus à l'aide du bouton gauche de la souris, soit en tapant au clavier : Alt, la lettre correspondante au menu voulu (par exemple F), Entrée.
102102
103103Pour plus de détails consultez [[Main menu/fr]].
104104
105105### La barre de boutons
106106
107107C'est une barre d'outil à gauche de la fenêtre d'édition principale, juste au-dessous du menu principal et à gauche de la palette de composants, elle contient un jeu de boutons appelant les fonctions les plus fréquemment utilisées dans le menu :
108108
109109
110110**Nouvelle unité**, **Ouvrir** (avec une flèche pointant vers le bas, affichant une liste des fichiers récemment utilisés), **Enregistrer**, **Tout enregistrer**, **Nouvelle fiche**, **Commutation Fiche/Unité** (i.e. affiche la fiche ou le code source de l'unité), **Afficher les unités**, **Afficher les fiches**, **Exécuter** (i.e. compile et exécute), **Pause**, **Pas à pas approfondi**, **Pas à pas** (les deux derniers sont des fonctions de débogage).
111111
112112## La palette de composants
113113
114114La barre d'outils à onglets affiche un large choix d'icônes représentant les composants les plus courants pour la conception de formulaires.
115115
116116Chaque onglet affiche un jeu d'icônes, correspondant aux fonctionnalités du groupe de composants. L'icône la plus à gauche, figurant une flèche, est appelée outil de sélection.
117117
118118Si vous placez le pointeur de la souris sur l'une des icônes sans cliquer dessus, sont nom s'affichera. Notez que chaque nom commence par un 'T', ce qui signifie 'Type' ou plus précisément 'Class' de composant. Lorsque vous sélectionnez un composant pour l'intégrer dans un formulaire, la classe est ajoutée dans la section **type** de la partie **interface** de l'unité (habituellement en tant que partie de TForm1), et une instance de cette classe est ajoutée dans la section **var** (habituellement de la même manière que la variable Form1). Chaque **méthode** que vous écrivez pour être utilisée par le formulaire ou ses composants (i.e. Procédures ou Fonctions) sera placée dans la partie **implementation** de l'unité.
119119
120120Dans la liste suivante, vous trouverez des liens vers les fichiers qui contiennent la description de ses composants. Si vous souhaitez trouver les propriétés d'un composant en particulier, il peut être utile d'étudier le composant duquel il est dérivé (son parent). Par exemple, pour comprendre TMaskEdit, il est également utile d'examiner TCustomMaskEdit.
121121
122122**ONGLETS** (les noms sont largement explicites) :
123123
124124- **Standard**
125125
126126![](/wiki-images/4/4d/Component_Palette_Standart.png)
127127
128128
129129*Les composants fréquemment utilisés :*
130130
131131[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), [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)
132132
133133- **Additional**
134134
135135![](/wiki-images/7/7d/Component_Palette_Additional.png)
136136
137137
138138*Des composants souvent utilisés en complément :*
139139
140140[TBitBtn](http://lazarus-ccr.sourceforge.net/docs/lcl/buttons/tbitbtn.html), [TSpeedButton](http://lazarus-ccr.sourceforge.net/docs/lcl/buttons/tspeedbutton.html), [TStaticText](http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tstatictext.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), [TCheckListBox](http://lazarus-ccr.sourceforge.net/docs/lcl/checklst/tchecklistbox.html), [TScrollBox](http://lazarus-ccr.sourceforge.net/index.php?wiki=FormsTxt#TScrollBox), [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), [TColorBox](http://lazarus-ccr.sourceforge.net/docs/lcl/colorbox/tcolorbox.html), [TColorListBox](http://lazarus-ccr.sourceforge.net/docs/lcl/colorbox/tcolorlistbox.html), TChart
141141
142142- **Common Controls**
143143
144144![](/wiki-images/4/4a/Component_Palette_Common_Controls.png)
145145
146146
147147[TTrackBar](http://lazarus-ccr.sourceforge.net/docs/lcl/comctrls/ttrackbar.html), [TProgressBar](http://lazarus-ccr.sourceforge.net/docs/lcl/comctrls/tprogressbar.html), [TTreeView](http://lazarus-ccr.sourceforge.net/docs/lcl/comctrls/ttreeview.html), [TListView](http://lazarus-ccr.sourceforge.net/docs/lcl/comctrls/tlistview.html), [TStatusBar](http://lazarus-ccr.sourceforge.net/docs/lcl/comctrls/tstatusbar.html), [TToolBar](http://lazarus-ccr.sourceforge.net/docs/lcl/comctrls/ttoolbar.html), [TUpDown](http://lazarus-ccr.sourceforge.net/docs/lcl/comctrls/tupdown.html), [TPageControl](http://lazarus-ccr.sourceforge.net/docs/lcl/comctrls/tpagecontrol.html), [TTabControl](http://lazarus-ccr.sourceforge.net/docs/lcl/comctrls/ttabcontrol.html), [THeaderControl](http://lazarus-ccr.sourceforge.net/docs/lcl/comctrls/theadercontrol.html), [TImageList](http://lazarus-ccr.sourceforge.net/docs/lcl/controls/timagelist.html)
148148
149149- **Dialogs**
150150
151151![](/wiki-images/7/72/Component_Palette_Dialogs.png)
152152
153153
154154[TOpenDialog](http://lazarus-ccr.sourceforge.net/docs/lcl/dialogs/topendialog.html), [TSaveDialog](http://lazarus-ccr.sourceforge.net/docs/lcl/dialogs/tsavedialog.html), [TSelectDirectoryDialog](http://lazarus-ccr.sourceforge.net/docs/lcl/dialogs/tselectdirectorydialog.html), [TColorDialog](http://lazarus-ccr.sourceforge.net/docs/lcl/dialogs/tcolordialog.html), [TFontDialog](http://lazarus-ccr.sourceforge.net/docs/lcl/dialogs/tfontdialog.html), [TfindDialog](http://lazarus-ccr.sourceforge.net/docs/lcl/dialogs/tfinddialog.html), [TReplaceDialog](http://lazarus-ccr.sourceforge.net/docs/lcl/dialogs/treplacedialog.html), [TOpenPictureDialog](http://lazarus-ccr.sourceforge.net/docs/lcl/extdlgs/topenpicturedialog.html), [TSavePictureDialog](http://lazarus-ccr.sourceforge.net/docs/lcl/extdlgs/tsavepicturedialog.html), [TCalendarDialog](http://lazarus-ccr.sourceforge.net/docs/lcl/extdlgs/tcalendardialog.html), [TCalculatorDialog](http://lazarus-ccr.sourceforge.net/docs/lcl/extdlgs/tcalculatordialog.html), TPrinterSetupDialog, TPrintDialog, TPageSetupDialog
155155
156156Beaucoup de procédures ou de fonctions utiles comme les [[Dialog Examples/fr|boîtes de dialogue]] n'apparaissent pas directement dans la palette de composants, mais peuvent être facilement appelées dans le code source du programme.
157157
158158Pour quelques bons exemples sur l'utilisation des composants, voir le sous-répertoire \$LazarusPath/lazarus/examples de votre installation. Beaucoup de ces programmes montrent comment utiliser les boîtes de dialogue et d'autres composants directement sans utiliser l'EDI et la palette de composants, ou des définition de fichier séparés : tous les composants sont complets et explicitement définis dans le programme Pascal principal. D'autres exemples de programmes utilisent pleinement l'EDI.
159159
160160Certains exemples ne fonctionnent pas immédiatement : vous pourriez avoir besoin de modifier les chemins et les permissions des fichiers des répertoires. Si vous souhaitez compiler quelques exemples, faites attention à avoir les permissions de lecture/écriture/exécution pour les fichiers et les répertoires, ou copiez les fichiers dans un répertoire sur lequel vous avez les permissions appropriées.
161161
162162Essayez d'exécuter le programme 'testall' pour voir un menu des composants disponibles ainsi que de petits exemples de formulaires de test pour la plupart d'entre eux ; ensuite inspectez le code pour comprendre comment ils fonctionnent !
163163
164164- **Misc**
165165
166166![](/wiki-images/8/8e/Component_Palette_Misc.png)
167167
168168
169169[TColorButton](http://lazarus-ccr.sourceforge.net/docs/lcl/dialogs/tcolorbutton.html), [TSpinEdit](http://lazarus-ccr.sourceforge.net/docs/lcl/spin/tspinedit.html), [TFloatSpinEdit](http://lazarus-ccr.sourceforge.net/docs/lcl/spin/tfloatspinedit.html), [TArrow](http://lazarus-ccr.sourceforge.net/docs/lcl/arrow/tarrow.html), [TCalendar](http://lazarus-ccr.sourceforge.net/docs/lcl/calendar/tcalendar.html), [TEditButton](http://lazarus-ccr.sourceforge.net/docs/lcl/editbtn/teditbutton.html), [TFileNameEdit](http://lazarus-ccr.sourceforge.net/docs/lcl/editbtn/tfilenameedit.html), [TDirectoryEdit](http://lazarus-ccr.sourceforge.net/docs/lcl/editbtn/tdirectoryedit.html), [TDateEdit](http://lazarus-ccr.sourceforge.net/docs/lcl/editbtn/tdateedit.html), [TCalcEdit](http://lazarus-ccr.sourceforge.net/docs/lcl/editbtn/tcalcedit.html), [TFileListBox](http://lazarus-ccr.sourceforge.net/docs/lcl/filectrl/tfilelistbox.html), [TXMLPropStorage](http://lazarus-ccr.sourceforge.net/docs/lcl/xmlpropstorage/txmlpropstorage.html), [TIniPropStorage](http://lazarus-ccr.sourceforge.net/docs/lcl/inipropstorage/tinipropstorage.html), [TbarChart](http://lazarus-ccr.sourceforge.net/docs/lcl/chart/tbarchart.html), [TButtonPanel](http://lazarus-ccr.sourceforge.net/docs/lcl/buttonpanel/tbuttonpanel.html), TIDEDialogLayoutStorage
170170
171171- **Data Controls**
172172
173173![](/wiki-images/6/62/Component_Palette_DataControls.png)
174174
175175
176176*Composants orientés données, qui copient très largement les groupes Standard et Additionnel mais sont applicables aux bases de données :* [TDBNavigator](http://lazarus-ccr.sourceforge.net/docs/lcl/dbctrls/tdbcustomnavigator.html), [TDBText](http://lazarus-ccr.sourceforge.net/docs/lcl/dbctrls/tdbtext.html), [TDBEdit](http://lazarus-ccr.sourceforge.net/docs/lcl/dbctrls/tdbedit.html), [TDBMemo](http://lazarus-ccr.sourceforge.net/docs/lcl/dbctrls/tdbmemo.html), [TDBImage](http://lazarus-ccr.sourceforge.net/docs/lcl/dbctrls/tdbimage.html), [TDBListBox](http://lazarus-ccr.sourceforge.net/docs/lcl/dbctrls/tdblistbox.html),[TDBComboBox](http://lazarus-ccr.sourceforge.net/docs/lcl/dbctrls/tdbcombobox.html), [TDBCheckBox](http://lazarus-ccr.sourceforge.net/docs/lcl/dbctrls/tdbcheckbox.html), [TDBRadioGroup](http://lazarus-ccr.sourceforge.net/docs/lcl/dbctrls/tdbradiogroup.html), [TDBCalendar](http://lazarus-ccr.sourceforge.net/docs/lcl/dbctrls/tdbcalendar.html), [TDBGroupBox](http://lazarus-ccr.sourceforge.net/docs/lcl/dbctrls/tdbgroupbox.html), [TdbGrid](http://lazarus-ccr.sourceforge.net/docs/lcl/dbgrids/tdbgrid.html)
177177
178178- **Data Access**
179179
180180![](/wiki-images/c/cc/Component_Palette_DataAccess.png)
181181
182182
183183TDatasource, TMemDataset (Package MemDSLaz), TSdfDataSet (Package SDFLaz), TFixedFormatDataSet (Package SDFLaz), TDbf (Package DBFLaz)
184184
185185- **System**
186186
187187![](/wiki-images/f/fe/Component_Palette_System.png)
188188
189189
190190[TTimer](http://lazarus-ccr.sourceforge.net/docs/lcl/extctrls/ttimer.html), [TIdleTimer](http://lazarus-ccr.sourceforge.net/docs/lcl/extctrls/tidletimer.html), [TLazComponentQueue](http://lazarus-ccr.sourceforge.net/docs/lcl/lresources/tlazcomponentqueue.html), [THTMLHelpDatabase](http://lazarus-ccr.sourceforge.net/docs/lcl/lazhelphtml/thtmlhelpdatabase.html), [THTMLBrowserHelpViewer](http://lazarus-ccr.sourceforge.net/docs/lcl/lazhelphtml/thtmlbrowserhelpviewer.html), TProcess, TSimpleIPCClient, TSimpleIPCServer, TXMLConfig
191191
192192- **SynEdit**
193193
194194![](/wiki-images/2/22/Component_Palette_SynEdit.png)
195195
196196
197197*Un groupe de composants pour aider à interfacer d'autres langage et outils logiciels. SynEdit est un puissant composant d'édition multiligne, pour Borland Delphi, Kylix et C++ Builder. Il supporte la coloration syntaxique et la complétion de code, et il inclut l'export aux formats html, tex et rtf. C'est un contrôle VCL/CLX à part entière, ce qui signifie qu'il n'encapsule pas un contrôle Microsoft Windows, et qu'aucune bibliothèque d'exécution n'est requise ; cela fait de SynEdit un composant multi-plateforme. La compatiblité avec FreePascal est également prévue, et SynEdit est le composant d'édition dans l'EDI Lazarus.* voir [synedit sur sourceforge](http://synedit.sourceforge.net).
198198
199199TSynEdit, TSynAutoComplete, TSynExporterHTML, TSynMacroRecorder, TSynMemo, TSynPasSyn, TSynCppSyn, TSynJavaSyn, TSynPerlSyn, TSynHTMLSyn, TSynXMLSyn, TSynLFMSyn, TSynUNIXShellScriptSyn, TSynCssSyn, TSynPHPSyn, TSynTeXSyn, TSynSQLSyn, TSynPythonSyn, TSynAnySyn, TSynMultiSyn
200200
201201### Comment utiliser la Palette
202202
203203Pour utiliser une palette, il faut afficher une fiche dans l'éditeur (s'il n'y en a pas, sélectionnez Fichier -\> Nouvelle fiche). Cliquez sur l'icône du composant que vous souhaitez utiliser dans l'onglet approprié de la palette, et cliquez sur la fiche, vous verrez le composant apparaître. À ce moment là, vous pourrez le sélectionner à l'aide de la souris, et le déplacer à l'endroit que vous souhaitez sur la fiche et ajuster sa taille. Les ajustements peuvent être effectués directement sur l'image du composant sur la fiche ou en modifiant ses propriétés dans l'éditeur d'objet.
204204
205205Si vous installez des composants additionnels, que ce soit des composants que vous avez vous-même écrits, ou des paquets provenant d'autre sources, de nouveaux onglets apparaîtront dans la palette de composants. Ces nouveaux composants peuvent être sélectionnés et utilisés sur vos fiches de la même manière que ceux fournis par défaut.
206206
207207## Comment utiliser les contrôles *Standard*, *Common* et étendus
208208
209209Les Unités StdCtrls, ComCtrls et ExtCtrls contiennent les définitions et les descriptions de beaucoup des contrôles les plus fréquemment utilisés pour la construction de fiches et d'autres objets dans les applications Lazarus.
210210
211211De nombreux contrôles finaux utilisés par les développeurs, tels que TButton, TMemo, TScrollBar etc., correspondent à une classe ancêtre comme, respectivement, TCustomButton, TCustomMemo ou TCustomScrollBar. Plusieurs propriétés et méthodes relatives au contrôle final sont définies (et expliquées) plus complètement dans la classe TCustomXXX, le contrôle final en héritant.
212212
213213Si vous déposez un composant dans l'éditeur de fiche, vous n'avez pas besoin d'ajouter de code pour le créer. Le composant est automatiquement généré par l'EDI, ainsi que la fiche, et détruit lorsque la fiche est détruite.
214214
215215Cependant, si vous créez un composant vous-même par programmation, n'oubliez pas de le libérer lorsqu'il n'est plus utilisé.
216216
217217Si vous placez un composant dans l'éditeur de fiche et que vous regardez dans l'inspecteur d'objets, vous pourrez observer les propriétés changer en même temps que vous déplacez le composant.
218218
219219Par exemple placez un bouton (TButton) sur le formulaire, cliquez dessus pour le sélectionner, puis déplacez-le avec la souris. Vous verrez alors les valeurs Top et Left changer au fur et à mesure dans l'inspecteur d'objets pour refléter sa position. Si vous utilisez les poignées de redimensionnement du bouton pour modifier sa taille, vous verrrez les propriétés Height et Width changer de la même façon.
220220
221221Inversement, vous pouvez saisir dans l'inspecteur d'objets une valeur associée à une propriété, par exemple la hauteur (Height); vous verrez la taille de l'objet sur le formulaire changer pour correspondre à cette valeur.
222222
223223You can also explicitly change the properties of the object in code by typing (in the appropriate Implementation section of the Source editor), for example
224224
225-`         ``Form1.Button1.Height := 48;`\
226-`         `
225+``` pascal
226+ Form1.Button1.Height := 48;
227+```
227228
228229If you type this new value into the Source Editor and then look back at the Form Designer, you will see that the button on the Form has taken the new size. The new value will also be shown in the Object Inspector.
229230
230231En résumé, il existe généralement trois méthodes différentes pour déterminer chaque propriété d'un objet:
231232
232233- en utilisant la souris ;
233234- en définissant les valeurs dans l'inspecteur d'objets;
234235- ou explicitement en écrivant du code.
235236
236237La plupart des composants définis dans ces unités ont plusieurs propriétés communes ; d'autres sont spécifiques aux composants individuels. Nous décrirons ici les plus courantes. Des propriétés inhabituelles ou spécifiques à un contrôle seront décrites pour les contrôles individuels.
237238
238239De l'aide peut être obtenue en sélectionnant une propriété ou un mot clé, (dans l'inspecteur d'objet ou dans l'éditeur de source), puis en pressant `F1`. La page correspondante s'ouvrira alors.
239240
240241If the description of a property on that page is insufficient, you can navigate to the corresponding description in the ancestor classes, by selecting the links in the Inheritance listing or by selecting the ancestor Type in the declaration of the object.
241242
242-`           ``Constructors`
243+```text
244+ <i>Constructors</i>
245+```
243246
244247`such as ``Create`` allocate memory and system resources needed by the object. They also call the constructor of any sub-objects present in the class.`
245248
246-`           ``Destructors:`
249+```text
250+ <i>Destructors:</i>
251+```
247252
248253`remove the object and de-allocate memory and other resources. If you call ``Destroy`` for an object which hasn't being initialized yet it will generate an error. Always use the ``Free`` method to deallocate objects, because it checks whether an object's value is ``nil`` before invoking ``Destroy``.`
249254
250255Take the following precautions when creating your own Destroy method:
251256
252257- Declare Destroy with the override directive, because it is a virtual method.
253258- Always call 'inherited Destroy;' as the last thing on the destructor code.
254259- 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.
255260- Remember to call Free for all objects created on the constructor.
256261
257-Some commonly listed properties
262+```text
263+ <caption><b>Some commonly listed properties</b></caption>
264+```
258265
259266Property
260267
261268Meaning
262269
263270Action
264271
265272The main action or event associated with the object. For example selecting an 'Exit' Button might cause the 'Close' action
266273
267274Align
268275
269276Defines the way in which an object is to be lined up with the parent object. Possible values are alTop (placed at the top and using the full available width), alBottom, alLeft (placed at the left and using the full available height), alRight. alNone (place anywhere on parent control) or alClient (takes all available space next to controls aligned to top, bottom, left or right)
270277
271278Anchor
272279
273280Used to keep a control a certain distance from the defined edges of a parent control, when the parent is resized. For example \[akBottom, akRight\] will keep the control a fixed distance from the bottom right corner.
274281
275282AutoSelect
276283
277284When True, an editing control will select all its text when it receives focus or when the Enter key is pressed.
278285
279286AutoSelected
280287
281288True indicate that the edit or combobox control has just performed an AutoSelect operation so that subsequent mouse-clicks and keystrokes proceed normally without selecting the text.
282289
283290BorderSpacing
284291
285292The space around the edge between an Anchored control and its parent.
286293
287294Caption
288295
289296The text that is displayed on or near the control; it should preferably give some clue as to the function of the control, or an instruction such as 'Close' or 'Execute'. By default Caption is set to be the same as the 'Name' property, and the application programmer should substitute meaningful text instead of the default values.
290297
291298CharCase
292299
293300Indicates how text is displayed in a text editing control: Normal (retaining the case of the letters typed by the user), converted to uppercase, or converted to lowercase
294301
295302Constraints
296303
297304Sets the minimum and maximum sizes for a control. If a control is resized the new dimensions are always within the ranges given here. You should take care when setting these options that they do not conflict with the Anchors and Align settings.
298305
299306Color
300307
301308The Colour to be used to draw the control or to write the text it contains.
302309
303310Enabled
304311
305312A Boolean property to determine whether or not a control is capable of being selected and performing an action. If it is not Enabled, it is often Grayed out on the Form.
306313
307314Font
308315
309316The Font to be used for writing the text associated with the control - either the caption or label, or the text-strings contained within the control. The entry on the Object Inspector usually has a (+) box on the left, and selecting this box reveals further options such as character set, colour and size.
310317
311318Hint
312319
313320A short piece of informative pop-up text that appears if the mouse-cursor hovers over the control.
314321
315322Items
316323
317324The list of 'Things' that the object contains, such as a group of images, a series of lines of text, a number of actions in an actionlist, etc
318325
319326Lines
320327
321328An array of strings, containing the textual data in controls with more than a single line of data, such as an Edit-Box or a Combo-Box. The array is zero-indexed, ie the lines are numbered \[0..numLines-1\]
322329
323330Name
324331
325332The identifier by which the control is known in the program. The IDE gives it a default name based on the underlying type, for example successive instances of TBitButton would be named Form1.BitBitton1 and Form1.BitButton2; it is up to the application programmer to give them more meaningful names such as ExitButton or OKButton. By default the Name of the control is applied to the Caption for the control, but the text of the Caption may be changed separately.
326333
327334PopUpMenu
328335
329336A window containing context-sensitive menu information that pops up when the right mouse button is clicked on the object.
330337
331338Position (or Top, Left)
332339
333340Determines where the control is located on the parent form or window
334341
335342ReadOnly
336343
337344Boolean property which, if True, signifies that the contents of the control can be read by the user or the calling routine, but cannot be written or changed.
338345
339346ShowHint
340347
341348Allows a small window containing a context-sensitive Help or other description to be displayed when the mouse cursor 'hovers' over the control.
342349
343350Size (or Height and Width)
344351
345352The dimensions of the control
346353
347354Style
348355
349356The options available for Style depend upon the sort of Control being considered: for instance the Style may be defined by TFormStyle, TBorderStyle, TButtonStyle etc.
350357
351358TabOrder
352359
353360Integer defining where in the sequence of tabs on the Form this control is to lie
354361
355362TabStop
356363
357364Boolean property which if True places this control in the sequence of objects that the user can reach by successively pressing the Tab key
358365
359366Text
360367
361368The String of Text that represents the actual data that this control contains. Applies particularly to Text, Memo and StringList types of object. 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.
362369
363370Visible
364371
365372If true, the object can be seen on the Form; if False, object is hidden
366373
367374WordWrap
368375
369376Logical flag to show whether or not word-wrap is enabled, ie if a word comes close to the end of a line and is going to be too long for the line, it is wrapped down to the next line.
370377
371378Many actions are commonly listed in the 'Events' tab of the Object Inspector. If you select an entry in the list, a ComboBox appears with a DropDown list showing any actions that have aleady been defined, and allowing you to choose one to be associated with this event. Alternatively you can select the ellipsis (three dots ...) and you will be taken to an area of the Source Editor where you can begin typing your own action instructions for the selected event.
372379
373380While a large number of events is available for any given control, in practice it is only necessary to populate a few of them. For most controls, it is sufficient to provide coding for 'OnClick'; for more complex controls it may be necessary also to provide for 'OnEntry' (when the mouse cursor enters the Control and gives it focus) and 'OnExit' (when the mouse cursor leaves the Control; or you may need to write an event handler for 'OnChange' or 'OnScroll', depending on the nature of the particular control with which you are dealing.
374381
375382The pop-up menu that appears when you right-click an object in the Form Designer has, as its first item: 'Create default event' and selecting this option will have the same effect as selecting the ellipsis in the Object Inspector for the default event, usually OnClick: you are taken to the Implementation area of the Source Editor where you can type the code for the event handler.
376383
377384A common strategy in Object-Oriented programming is to provide an ActionList with the facility for entering, removing or editing a number of pre-defined actions from which the most appropriate can be selected to use in any particular instance.
378385
379-Some commonly listed Actions
386+```text
387+ <caption><b>Some commonly listed Actions</b></caption>
388+```
380389
381390Action
382391
383392Meaning
384393
385394OnChange
386395
387396Action to be taken if any change is detected (eg mouse move, mouse click, key press, edit text, alter picture, etc)
388397
389398OnClick
390399
391400Action to be taken when the (left) mouse button is clicked. This is usually the main or default action of the control; for example clicking on a button or checkbox initiates the action associated with the checkbox. It may alternatively initate a process of selection, for instance in a TextBox or Memo, or signal the beginning of painting with a Pen or Brush.
392401
393402Click
394403
395404A method to emulate in code the effect of clicking on a control. This method is most often found in Button-type controls (TButton, TBitBtn, TSpeedButton etc). A procedure can be written that calls the same code as the OnClick action. This facility can be particularly useful if the activation of one control by clicking causes a cascade of other controls to be activated, and the Click method can be used to initiate the action rather than having the user explicitly click on a lot of controls.
396405
397406OnDragDrop
398407
399408Action to be taken during Drag-Drop manoeuvres, ie when the mouse is used to 'capture' an item or some text etc and move it around the screen to a new location.
400409
401410OnEntry
402411
403412Action to be taken when the mouse cursor enters the area occupied by the object, usually transfering focus to that object. This might include changes in the appearance of the object such as highlighting or raising the border.
404413
405414OnExit
406415
407416Action to be taken when the mouse moves out of the area of the object, usually transferring focus out of the object.
408417
409418OnKeyPress
410419
411420Action to be taken for any key-press. Subtly different from OnKeyDown, which simply responds to a key being down, whether or not it was already down when focus was given to this control. OnKeyPress requires that a key becomes pressed while focus is in this control.
412421
413422OnKeyDown
414423
415424Action to be taken if a key is down while focus is in this control. Subtly different from OnKeyPress - for example the key might already have been down when focus entered this control, whereas OnKeyPress requires the key to become pressed while focus is in the control.
416425
417426On Key Up
418427
419428Action to be taken if a key is up (ie not pressed) while focus is in this control.
420429
421430OnMouseMove
422431
423432On Mouse Down - Action to be taken if the mouse cursor moves while focus is in this control.
424433
425434OnMouseDown
426435
427436Action to be taken if the mouse button is down while focus is in this control.
428437
429438OnMouseUp
430439
431440Action to be taken if the mouse button is up while the cursor is over this control. Implies that the mouse button was previously down and has been released. The case where the cursor enters the control but the mouse button has not yet been pressed is covered by OnEntry or OnMouseEnter.
432441
433442OnResize
434443
435444Action to be taken when the control is resized. Might include re-alignment of text or selection of a different font size etc.
436445
437446## Comment utiliser les Menus
438447
439448Trucs et astuces pour l'ajout de Menus dans vos Fiches.
440449
441450*TMainMenu* is the Main Menu that appears at the top of most forms; form designers can customise by choosing various menu items. *TPopupMenu* is a menu window that pops up with pertinent, usually context-sensitive, details and choices when the right mouse button is clicked near a control
442451
443452Main Menu is a non-visible component : that is, if the icon is selected from the Component Palette and placed on the Form, it will not appear at Run-time. Instead, a Menu bar with a structure defined by the Menu Editor will appear. Popup menus, placed on the form by selecting the icon from the Component Palette, do not appear at all unless the right mouse button is clicked on a control that owns such a menu.
444453
445454To see the Menu Editor, right-click on the Main Menu or Popup Menu icon on your Form. A pop-up box appears, that invites you to enter items into the Menu bar.
446455
447456An Edit box is displayed, containing a Button labelled New Item1. If you right-click on that box, a pop-up menu is displayed that allows you to add a new item before or after (along the same level) or create a sub-menu with the opportunity to add further items below (or above) the new item in a downward column.
448457
449458Any or all of the *MenuItems* that you add can be configured using the Object Inspector.
450459
451460At the least you should give each item a *Caption* which will appear on the Menu Bar (you may also wish to give it a more meaningful *Name*). The caption should indicate the activity to be selected, such as "File Open" or "Close", "Run" or "Quit"
452461
453462If you want a particular letter in the Caption to be associated with a shortcut key, that letter should be preceded by an ampersand. The Menu item at run-time will appear with the shortcut letter underlined, and hitting that letter key will have the same effect as selecting the menu item. Alternatively you can choose a shortcut key sequence (such as `Ctrl`+`C` for Copy or `Ctrl`+`V` for Paste - the standard Keyboard shortcuts) with the *ShortCut* property of the MenuItem.
454463
455464It is often helpful to use the Menu controls in conjuction with an *ActionList* which contains a series of standard or customised *Actions*. Menu Items can be linked in the Object Inspector to Actions on the list, and the same actions can be linked to *Buttons*, *ToolBar Buttons*, *SpeedButtons* etc. It is obviously economic of effort to re-use the same code to respond to the various events, rather than writing separate *OnClick* event handlers for each individual control.
456465
457466By default a number of standard actions is pre-loaded from *StdActns* or, if DataAware controls are being used, from *DBActns*, and these can be chosen using the ActionList editor which appears when you right-click on the ActionList icon on the Form Designer.
458467
459468## Le débogueur
460469
461470
462471*Reste encore à écrire*.
463472
464473voir également [:category: IDE Window - Debug](/wiki-category/IDE%20Window%20-%20Debug)
465474
466475## Les fichiers de Lazarus
467476
468-`   (Thanks to Kevin Whitefoot.)`\
469-`   (Additions by Giuseppe Ridinò, `User:Kirkpatc` and Tom Lisjac)`
477+```text
478+ (Thanks to Kevin Whitefoot.)
479+ (Additions by Giuseppe Ridinò, User:Kirkpatc and Tom Lisjac)
480+```
470481
471482Lorsque vous enregistrez, vous sauvez en réalité deux fichiers :
472483
473-`  xxx.pas et yyy.lpr `
484+```text
485+ xxx.pas et yyy.lpr
486+```
474487
475488(En fait en vous enregistrez plus que ça, mais ces deux-là sont les seuls auxquels vous donnez un nom). Le fichier de projet **.lpr** et le fichier d'unité **.pas** ne doivent pas avoir le même nom car Lazarus attribuera automatiquement à l'unité (dans le code source) le nom du fichier d'unité, et au programme, le nom du fichier de projet (sinon, le compilateur pourrait ne pas retrouver l'unité quand le fichier de projet y fera référence). Bien sûr, pour être cohérent, il change toute les occurrences de Unit1 en xxx.
476489
477490Par conséquent, si vous enregistrez un fichier appelé **encore**, encore.pas et encore.lpr, la compilation échouera car les noms de l'unité et du programme sont les mêmes ce qui entraînera une erreur.
478491
479492Les fichiers sont donc :
480493
481494e:/lazarus/kj/lazhello
482495
483-`total 4740  free 76500`\
484-`-rwxrwxrwx   1 kjwh     root  4618697 Mar 24 11:19 encore.exe`\
485-`-rw-rw-rw-   1 kjwh     root     3002 Mar 24 11:21 encore.lpi`\
486-`-rw-rw-rw-   1 kjwh     root      190 Mar 24 11:18 encore.lpr`\
487-`-rw-rw-rw-   1 kjwh     root      506 Mar 24 11:08 encoreu.lfm`\
488-`-rw-rw-rw-   1 kjwh     root      679 Mar 24 11:08 encoreu.lrs`\
489-`-rw-rw-rw-   1 kjwh     root      677 Mar 24 11:08 encoreu.pas`\
490-`-rw-rw-rw-   1 kjwh     root     2124 Mar 24 11:08 encoreu.ppu`\
491-`-rwxrwxrwx   1 kjwh     root      335 Mar 24 11:07 ppas.bat`
496+```text
497+total 4740 free 76500
498+-rwxrwxrwx 1 kjwh root 4618697 Mar 24 11:19 encore.exe
499+-rw-rw-rw- 1 kjwh root 3002 Mar 24 11:21 encore.lpi
500+-rw-rw-rw- 1 kjwh root 190 Mar 24 11:18 encore.lpr
501+-rw-rw-rw- 1 kjwh root 506 Mar 24 11:08 encoreu.lfm
502+-rw-rw-rw- 1 kjwh root 679 Mar 24 11:08 encoreu.lrs
503+-rw-rw-rw- 1 kjwh root 677 Mar 24 11:08 encoreu.pas
504+-rw-rw-rw- 1 kjwh root 2124 Mar 24 11:08 encoreu.ppu
505+-rwxrwxrwx 1 kjwh root 335 Mar 24 11:07 ppas.bat
506+```
492507
493508Note : il y a plus de fichiers que les deux que j'ai enregistrés.
494509
495510Ci-dessous un bref commentaire sur chacun des fichiers :
496511
497512**encore.exe :** l'exécutable du programme. Win32 ajoute l'extension **.exe**, mais pas Linux. Ce fichier sera très gros sous Linux à cause de l'inclusion des symboles de débogage (il est prévu de résoudre ce problème). Cependant, vous pouvez exécuter l'utilitaire "strip" pour supprimer ces symboles et réduire de façon substantielle la taille de l'exécutable.
498513
499514**encore.lpi :** c'est le fichier principal d'un projet Lazarus (Lazarus Project Information) ; l'équivalent Delphi du fichier **.dpr**. Il est enregistré dans un dialecte XML et contient des instructions concernant toutes les bibliothèques et unités requises pour la compilation de l'exécutable.
500515
501516**encore.lpr :** c'est le fichier source principal du programme ou fichier maître. En dépit du fait qu'il ait une extension spécifique à Lazarus, il s'agit en fait d'un fichier source Pascal parfaitement normal. Il possède une clause **uses** qui permet au compilateur de trouver toutes les unités nécessaires. Veuillez noter que le nom du programme et celui du fichier n'ont pas besoin d'être identiques. Ce fichier est habituellement plutôt petit, ne comportant que quelques assertions permettant d'initialiser et construire les fiches, et démarrer et terminer l'application. Le gros du travail est effectué dans les fichiers sources des unités, dont l'extension est '.pas'.
502517
503518**encoreu.lfm :** c'est ici que Lazarus stocke les paramètres de la fiche (position, taille...), sous forme compréhensible. C'est le reflet des propriétés de divers composants, telles qu'elles apparaissent dans l'Inspecteur d'objet. Chaque description d'objet débute par une ligne :
504519
505-`object xxxx `\
506-`  suit une liste de propriétés y compris les objets encapsulés ou les sous-objets) puis la ligne`\
507-`end`
520+``` pascal
521+object xxxx
522+ suit une liste de propriétés y compris les objets encapsulés ou les sous-objets) puis la ligne
523+end
524+```
508525
509526Lazarus utilise ce fichier pour générer la ressource incluse dans la section d'initialisation de l'unité encoreu.pas. Les fichiers **.dfm** de Delphi peuvent être convertis au format **.lfm** dans l'EDI de Lazarus en utilisant la commande *Outils-\>Convertir un fichier DFM en fichier LFM...*.
510527
511528**encore.lrs :** c'est le fichier de ressource qui contient les instructions permettant au programme de construire la fiche. Si vous regardez le fichier de l'unité principale, vous verrez dans la section d'initialisation la ligne
512529
513-`{$i againu.lrs}`
530+```text
531+{$i againu.lrs}
532+```
514533
515534qui commande au programme de charger le fichier de ressources. Notez que ce n'est pas un fichier de ressources Windows.
516535
517536**encoreu.pas :** ce fichier d'unité contient votre code correspondant à cette fiche. C'est habituellement le seul fichier que le développeur a besoin d'éditer ou inspecter. Il contient tout le code spécifiquement ajouté par le développeur (en particulier, les 'event handlers').
518537
519538**encore.ppu :** l'unité compilée. Elle est liée à l'exécutable, ainsi les autres unités citées dans la section **Uses**.
520539
521540**ppas.bat :** c'est un simple script qui lie (link) le programme pour produire l'exécutable. Si la compilation réussit, il est effacé par le compilateur.
522541
523542## Contributeurs originaux et changements
524543
525544Cette page a été importée de [epikwiki](http://lazarus-ccr.sourceforge.net/index.php?wiki=LazarusTutorial).
526545
527546- Created initial page and template. T. Lisjac - 11/04/2003 VlxAdmin
528547- 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
529548- Per above, moved Chris's writeup to the main body of the tutorial VlxAdmin
530549- Began to insert text describing the Lazarus Editor - more to follow! 24 Mar 2004 User:Kirkpatc
531550- Added some more to Lazarus Editor section of Tutorial. 25 Mar 2004 User:Kirkpatc
532551- Added screenshots and revised some of the page formatting VlxAdmin 3/25/2004
533552- 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
534553- Formatted, added credits and comments. Removed original notes. VlxAdmin 3/26/2004
535554- More material added to Editor section of tutorial. 26 Mar 2004 User:Kirkpatc
536555- 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
537556- Inserted section on Run sub-menu. Some general editing (eg ended each entry with a period to ensure consistency). 9 Apr 2004 User:Kirkpatc
538557- Inserted a new section on How to get started with MySQL in FPC/Lazarus. 13 Apr 2004 User:Kirkpatc
539558- Deleted the section on MySQL from here: it has been copied to Lazarus Database section of tutorial. 14 Apr 2004 User:Kirkpatc
540559- Added some more to the description of the Editor Main Menu. 18 Apr 2004 User:Kirkpatc
541560- Added section on Environment sub-menu. 19 Apr 2004 User:Kirkpatc
542561- Added section on Components sub-menu. 4 May 2004 User:Kirkpatc
543562- Adding Tools sub-menu description (incomplete). 7 May 2004 User:Kirkpatc
544563- Added some screenshots to Menu descriptions. 9 May 2004 User:Kirkpatc
545564- Fixed a bit in Environment Options - thanks VincentSnijders. 14 May 2004 User:Kirkpatc
546565- More additions to Tools sub-menu. 19 May 2004 User:Kirkpatc
547566- Added a section on the Button Bar and started work on The Component Palette. 20 May 2004 User:Kirkpatc
548567- Posted a description file for the StdCtrls unit of the LCL, in the hope that people will add comments. 26 May 2004 User:Kirkpatc
549568- 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
550569- Expanding on the Components Palette. 5 June 2004 User:Kirkpatc
551570- Added a lot to the DialogExamples page. 10 June 2004 User:Kirkpatc
552571- 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
553572- 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
554573- Added page for Common Controls (linked to Component Palette). 16 June 2004 User:Kirkpatc
555574- Added MaskEdit page (linked to Component Palette). 17 June 2004 User:Kirkpatc
556575- Added Buttons, ExtCtrls pages (linked to Component Palette). 17 June 2004 User:Kirkpatc
557576- Edited MainMenu component description page. 23 June 2004 User:Kirkpatc
558577- Some additions to Common Controls. 28 June 2004 User:Kirkpatc
559578- A new tutorial on Text-mode Pascal programming has been added. 5 July 2004 User:Kirkpatc
560579- Minor changes to ComCtrls, ExtCtrls, Environment Menu. 10 July User:Kirkpatc
561580- Added FormsTxt, component description page for Component Palette. 20 July 2004 User:Kirkpatc
562581- Some corrections to ConsoleModePascal. 21 July 2004 User:Kirkpatc
563582- Some small changes to ComponentPalette. 22 July 2004 User:Kirkpatc
564583
565584---
566585*From the Free Pascal wiki, page "Lazarus Tutorial/fr", as it stood on 2021-12-08 after a change by Trev, 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).*

Back to history