Package contents

The distribution of HBasic already contains some packages with precompiled components which may be used within your program. This document describes the components within this packages. Currently this packages do not support many methods and properties. They have to be extended in the future step by step.

You can find the compiled packages in the directory /usr/local/hbasic/packages. These packages are
Name of package Component description
hbasic_stdgui GUI components for default widgets
hbasic_file Components for file access and file managment
hbasic_dbaccess Components for database access
hbasic_picture Components to draw pixel images
Date and time component with depending methods
Standard dialogs
Simple dialog to display messages
Example package for documentation purposes.

You can find examples how to use the components of this packages in the following paragraphs of the documentation.
Name of package Type of code examples 
hbasic_stdgui All examples that use buttons or other widgets
hbasic_file Examples about file access
hbasic_dbaccess Examples about database access
hbasic_picture Following examples in this document

Example how to use the picture component.

Load the hbasic_painter package (with the package manager).
Create a gui component of type painter and a button to start painting .

Insert the following example code:

Sub button1_clicked()
   painter1.setcolor( 255,0,0)
   painter1.drawEllipse( 10,10,40,40)
   painter1.setColor( 0,200,20)
   painter1.roundrect( 35,40,40,40)
   painter1.setcolor( 200,200,30)
   painter1.line( 10,10,80,80)
End Sub

This program shows some method calls to set the drawing color or draw simple graphical elements in the painter widget.