Introducing Graphics

Home/Introducing Graphics
Introducing Graphics 2016-12-14T09:23:32+00:00

System Events

Timer – every tick of the system clock

Screen Refresh – based on the monitor characteristics

Introducing the Graphics Window

This section of the site looks at the Graphics Window to produce GUI programs.

This is not explicitly required at GCSE level, however, as we now almost exclusively interact with computers through a Graphical User Interface it seems futile to not include it.

Unlike most other coding environments, Small Basic does not include a graphical design element to its interface so as a coder, you have to master developing this through your code.  This is no bad thing as it forces you to think carefully about each visual element you need and where it should be on the screen.

When using the Text Window, your programs are primarily driven by direct user interaction via the keyboard.  If you needed some input, your program would just wait until it was provided.  In the GUI environment, programs are Event driven – the program doesn’t wait for an event – it responded to it if and when it happens.  Just because no user events are happening, does not mean that other events don’t continue regardless.  Consequently, your code gets triggered only if you program it to respond to a specific event when it happens – if you don’t write code for an event, it is simply ignored.

User Events

Mouse moves

Mouse button clicks

Mouse wheel moves

keyboard key presses

Graphic Window Objects

Top, Left, Width, Height, Title, backgroundColor

Object Name, Position, Width & Height