Gambas: Visual Programming GNU / Linux


Many who schedule or learn to program, either this profession, hobby or whatever, if we come from Windows (most secure) use is that some see or hear the well-known: Visual Basic. Well Gambas has many similarities with VB, Gambas is an IDE where we can program without worrying about coding the graphical environment, ie it is drag the buttons, text boxes and other elements to form concentrate on programming the internal functionality.

Gambas is not just an IDE as I just mentioned, in fact it is a free programming language derived from Basic and its meaning (in English) is a recursive acronym: "Gambas Almost Means Basic". Gambas uses a runtime as an interpreter for your applications (similar to Java).

I have it installed on Manjaro and Debian, to install one of these distributions is as follows:

  • # Pacman -S gambas3
  • # Apt-get install gambas3
  • Let's create a simple application that displays a message when you press a button, you will see how easy it is.

    Prawns open and create a new project.

    We follow the wizard by pressing the "next" button, which type of application we will develop, let's go for the default "Graphical Application" and click Next, note that you can create Qt and GTK + applications and console applications, CGI and others.

    Then follow the wizard by clicking Next, ask us where to create the project, as it is only a test it can be anywhere, the default is the user's home folder leave it there and click Next. Then place the name of the project:

    It will load the main interface, which we will know a little below:

    From now on I will assume that they have identified the parts are marked with red text: Project Files, Form, Properties (Property and Value) and Run. If okay, but what are they? Let us see:

    Now they turn to the left side of the screen to a panel where it says the name of the project ( "Project Files"), that is an explorer of the project components (in this case is called "proof" make double click FMain:

    The form appears in the central part of the application, then you click on the button that says "OK" (which is "Tools") of the next image, not release the click and drag to the form:

    Luego you click on the button and are directed to "properties" where the legend "Text" write "Message" or whatever they want.

    Como have seen, there are many applicable to properties button, in this case we are only interested in the name, continue, and now double click on the button acabos to add and modify your name, a new tab with source code appears:

    Button1_Clik placed between Public Sub () and End this:

     Message.Info ( "This is Gambas")

    Try not to copy and paste, come on, it's just one line of code, will find it interesting that as written suggestions appear commands that may be useful, it is always good to check them, make things a little easier, but eye this only if written and not just stick the code.

    Now, if we have done well, you are ready to run, just press F5 or press the button identified at the beginning ( "Run") or they are going to Debugging and click "Run", should appear the window with the button and clicking should look something like this:

    It is worth mentioning that the message could change depending on what you write in quotes in the line of the Message.Info code.

    Now we work with Labels, drag a new button to the form, change the Text property to another as "Show hidden text" or something similar. Leave it alone now arrasten one Label, it is the tool that has a letter "A" in big:

    A the Label will put a different text in the Text (similar to what we did and with buttons), property I have placed "Hidden Text" but not only change the text, but we will also make hidden and then to show it to press the second button that we have placed.

    In the picture above, you can see the "Visible" property which by default contains "True" let's change it to "False", if you run with F5, you will see that in fact the text is hidden.

    To show this, double click on the second button and placed between Button2_Clik Public Sub () and End the following:

    Label1.Visible = True

    Again, I recommend not copy paste.

    Now run again and clicking on the button will see how the message is displayed:

    What we just did is a fairly simple little program, made to show that Gambas is very similar to VB in terms of ease, just Gambas is free.

    At the moment is of little prawns but I intend to be learning and documenting in this way, I hope I have inspired some few hehe, greetings.

    Interesting about Gambas

    Install the latest version of Gambas on Ubuntu and begins to program applications

    -whose acronym is prawns "Gambas Almost Means Basic" - is analogous to Visual Studio on Windows. It is a visual programming environment -derived BASIC and very like Java- allows us to develop applications easily...


    Gambas: Visual Programming GNU / Linux

    Many who schedule or learn to program, either this profession, hobby or whatever, if we come from Windows (most secure) use is that some see or hear the well-known: Visual Basic...


    Learning to program with Gambas

    Gambas is a free programming language derived from BASIC (hence prawns means Gambas Almost Means Basic). It is distributed under the GNU GPL. Notably it presents certain similarities with Java...