Lazarus Components -The New Components
Lazarus Components. In older articles, we talked about a specific type of components present within the Lazarus IDE. Bringing today’s post, we open ourselves to another type of components. In the upcoming articles, we shall discuss the “Standard” type components within Lazarus. For those who are new to this article. A Component is a block. That when assembled with other components. We can use to make software in the Lazarus IDE with the pascal language.
The Lazarus IDE has 18 Standard type components. These range from lists, and scroll bars to buttons and check boxes. And more! This is the beginning of a new Lazarus series on the Standard type components. Holding 6 parts, this is gonna be one of the longest series made by my hands. But it’s also the most important. Dialogs can only do limited functions unless used with other components. Let us begin our study of Standard components. I shall discuss the function and usage of 3 components per part. Making this a 6 part series. Onwards we go!
The Standard Menu – Home Of New Components!
Let us view the Standard menu. To do this, simply open up Lazarus. And click on the Standard tab at the top of the screen. Near the Run menu. You will observe a variety of new and unknown components (Or Known components!). Each has it’s uses, with ups and downs. But ultimately as i mentioned earlier. All components combined, in flawless usage make the best software. Let’s begin discussing the first component of this series.
TMainMenu – The Basic Software
The TMainMenu component is used to make a menu. As well as to arrange it’s tabs and give it’s different buttons a function. This is a essential component that we can use to make a copy of notepad on our own! That might be a project in the future provided if you all want me to do it. But for now take a look at the image on how it looks like without being double clicked or ran as code
And below is how it looks like after being double clicked on
As observed by you, upon double clicking the Menu component. A window shows up. Here we can arrange the various menus, and tabs. More details into it later. But feel free to experiment with these components as you will. Just listening to me is not enough to learn coding you know! Experimenting is key. Onwards!
TPopUpMenu – Surprise Menu!
As it’s name suggests. When used correctly this menu will display a pop up with various functions. As of now like almost all other components. This one will not work unless we write code in it as well. Same goes with the menu mentioned above.
All this tedious stuff will be dealt with when the time comes. For now just knowing about these components is more than enough for you. And personal opinion here. I’m impressed you are seeing through to this whole course! And at amazing speed!. Mark my words you are off to be a wonderful programmer!. Ahem enough about that now.
The TPopUpMenu looks exactly the same as the Menu when double clicked on. And looks widely similar to the older Menu when not double clicked on. Hence for reference you can just view the image above again. Moving on to the final component of this part.
TButton – Buttoney Time!
Finally. We have reached the most commonly used component. And also one of the most important components. Personally speaking, it’s my favorite. The TButton component will create a button that we can give various functions to. Unlike all other components mentioned above, double clicking it will not show a image or any thing of the sort. However it’s still got it’s own looks when just put on the Form. Here is how it looks like when placed on the Form
And that about concludes this first part of our new components series. As much as i want to talk about the button more, it will have to wait. Can’t have the article being too big that you do not even bother reading it. But regardless, humor aside. In the next articles we will discuss further works of components. And after this series we begin the cool stuff. See you in my next post then! – Elyan.