Welcome, and thankyou for your interest in my project. FBToolbox is a cross platform compatible Freebasic library which provides a collection of frequently used GUI controls. It is designed in order to offer Windows-looking controls to programmers who for various reasons do not wish to use the Ms Windows API. The libraries API is extremely easy to use, and requires only minimal knowledge of Freebasic syntax. All of the GUI controls extend from the 'Controls' namespace, as summarised below;

Controls.FBTextbox
Controls.FBButton
Controls.FBEvents
Controls.FBProgressbar
Controls.FBListbox

Firstly, I am going to introduce the FBEvents sub-library. Its acts as a sort of gel which bonds all of the controls together, and without calling Controls.FBEvents.EEvents() none of the controls will work. We will move onto, perhaps the most common of all controls, the textbox control. In order to use a textbox control we first have to load a font, and we do this by using the font sub-library with the LFont_FontLoad function (this is set to become a namespace soon). Baring this in mind, we will now start to write some code;

#Include "FBToolbox.bi" ' // fbtoolbox is a wrapper for all the other libraries
If EFL_FileExists("Times New Roman") Then ' // Test if the font exists using the library
     LFont_FontLoad("Times New Roman") ' // If it does load it
Else
     Print "Font Not Found." ' // If it doesn't exist then tell the user
     Sleep ' // Make sure the user actually see's it :P
     End '// end the program
End If

With the foundations in place to start building our GUI, we can now move our attention onto the visual appearance of the Window we are creating. For the purpose of this tutorial I am going to focus on piecing together a simple text editor. The first element of the text editor is going to be a textbox control where the user will enter a filename. The function we use to load a new textbox control is TTextbox of the Controls.FBTextbox namespace. TTextbox takes the following variable values
(Alias As String, X As Single, Y As Single, Width As Integer, Height As Integer, Default As String, VScrollbar As Integer)
With this in mind we continue with our code;

' The default value can be null, and we do not require a scrollbar for this textbox Controls.FBTextbox.TTextbox("txtTextbox1", 10, 10, 250, 25, "", 0)
Hosted by www.Geocities.ws

1