Sign in Join
Wiki copytemporary

MSEide MSEgui first step: what changed

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

OldNewLine
11**My first mse program.**
22
33This introductory article for beginners. It contains step by step instructions to create the first program.
44
55Naturally, the software MSEide + MSEgui should already be installed.
66
77Start MSEide.
88
99The screen should get a window similar to the following:
1010
1111![](/wiki-images/6/67/Mseide_132.png)
1212
1313Let's create a new project.
1414
1515Project menu (Project) - New (New) - From template (From Template).
1616
1717On the screen you get the following:
1818
1919![](/wiki-images/a/a4/Mseide_142.png)
2020
2121At this point MSEide prompts you to select a template file for the new project.
2222
2323We can use or default.prj or default_all_langs.prj.
2424
2525Template default.prj has a smaller executable file, default_all_langs.prj will connect automatically language constants, and dialogs (eg, file open dialog), windows maintenance...
2626
2727For this first program we do not have any dialog and service windows, so it is sufficient template default.prj.
2828
2929Select and press Ok.
3030
3131Click new. Cat-g (New dir) to create a directory.
3232
3333In the dialog box that appears, type "hellodemo" and click Ok.
3434
3535In the second field from the bottom of the window New Project (New Project), enter "hello".
3636
3737Prj extension will be added automatically.
3838
3939Now click Ok:
4040
4141![](/wiki-images/0/0b/Mseide_152.png)
4242
4343You have created your first project !
4444
4545You should have at least four windows :
4646
4747\- 'MSEide (hello.prj)' - 'Component Palette (Component palette)' - 'Messages' - 'Source Code (Source, Messages) (Ctrl + F1) 'and' * mainfo '.
4848
4949Click on the box '* mainfo' (the smallest).
5050
5151Now you've got another important window =\> 'Object Inspector mainfo (Object inspector mainfo)'.
5252
5353For added convenience, grab the mouse box '* mainfo' for any angle and a little stretch.
5454
5555You will get something like this:
5656
5757![](/wiki-images/3/36/Mseide_162.png)
5858
5959This is the main form of your project - its main window.
6060
6161On it you will put the necessary visual or non-visual components.
6262
6363Take components needed from the ('Palette components (Component palette)'):
6464
6565![](/wiki-images/9/90/Mseide_172.png)
6666
6767The components are located on multiple pages.
6868
6969To switch between pages click on tabs at the top of the window.
7070
7171If you hold for a while the mouse pointer over a component, you will be prompted with the class (type) of this component.
7272
7373Now get component Widget tbutton and once click on it
7474
7575Now click on the main form of your project. Component appeared on the form.
7676
7777Place the mouse over the component.
7878
7979Now press the left mouse button and hold, move it to the side.
8080
8181Release the mouse button. Thus it is possible to move the component form.
8282
8383To change the size, perform the same steps with the black squares arranged around the perimeter of the component.
8484
8585Place the component in the right top of the form:
8686
8787![](/wiki-images/6/6d/Mseide_182.png)
8888
8989Go to the ('The object inspector mainfo (Object inspector mainfo)').
9090
9191In the drop-down list, select (if there is not already selected) tbutton1 (tbutton).
9292
9393Below in the box to the right of the field caption, type the - button.
9494
9595Now you have set the value of the caption in the 'button:
9696
9797![](/wiki-images/3/35/Mseide_192.png)
9898
9999Get the component type tlabel and place it on the left of our first button.
100100
101101Go to the Inspector window and select the object tbutton1 (tbutton) and
102102
103103set the value of a field in onexecute 'pressed' and press the Enter key on the keyboard.
104104
105105In the description of the class will be added the setnewaction method,
106106
107107and in the text of the module will be an empty implementation of this method.
108108
109109This method (procedure) will be called when the button is pressed.
110110
111111Go to the editor ('messages, source code (Source, Messages) (Ctrl + F1)') and edit the procedure pressed:
112112
113-` procedure tmainfo.pressed(const sender:TObject);`\
114-` begin`\
115-` tlabel1.caption:='Hello World!';`\
116-` end;`
113+``` pascal
114+ procedure tmainfo.pressed(const sender:TObject);
115+ begin
116+ tlabel1.caption:='Hello World!';
117+ end;
118+```
117119
118120Back in the form with a second button, write 'output' and in the procedure body onexecute,
119121
120122called by pressing the (procedure name as you want), register one line:
121123
122-` application.terminated:=true;`
124+``` pascal
125+ application.terminated:=true;
126+```
123127
124128Run one of three ways:
125129
126130\- By clicking on the green triangle in the main window;
127131
128132\- Pressing F9;
129133
130134\- In menu (Target) - Continue to start (Continue)
131135
132136![](/wiki-images/1/18/Mseide_202.png)
133137
134138This wiki was greatly inspired by web page of Alexei Yu Ulasevich (STAKANOV) =\> <http://freepascal.ru/article/mse>
135139
136140---
137141*From the Free Pascal wiki, page "MSEide MSEgui first step", as it stood on 2020-09-01 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).*
138142Category: MSEide+MSEgui
139143Category: Tutorials

Back to history