There are some keyboard shortcuts to quicken some common editing tasks:
Keystroke | Resulting Action |
---|---|
Ctrl+A | Position cursor at stArt of line. |
Ctrl+D | Delete the character after cursor. |
Ctrl+E | Position cursor at End of line. |
Ctrl+K | Kill text between the cursor and the next carriage return. |
Ctrl+N | Move cursor down one line (to the Next line). |
Ctrl+P | Move cursor up one line (to the Previous line). |
Topic | Description | Page |
---|---|---|
Comments | Remarks ignored by BASIC but useful to people | See Comments |
Variables, Constants, and Types | Places to store data, and types of data that is stored | See Variables, Constants, and Types |
Assignments and Expressions | Computing values by combining values and storing those values in variables | See Expressions and Assignments |
Flow Control Constructs | Branching and looping constructs | See Flow Control Constructs |
Calling Functions and Subroutines | Calling functions and subroutines: both those you've written, and those built in | See Calling Functions and Subroutines |
Built-in Routines | Routines provided by NewBASIC | See Built-in Routines and Operators |
Components | Summary of syntax for manipulating components, properties, actions, and events | See Components: Summary of Syntax |
Modules | Managing programs with source code in more than one file | See Loading Modules |
Topic | Description | Page |
---|---|---|
Comments | Remarks ignored by BASIC but useful to people | See Comments |
Variables, Constants, and Types | Places to store data, and types of data that is stored | See Variables, Constants, and Types |
Assignments and Expressions | Computing values by combining values and storing those values in variables | See Expressions and Assignments |
Flow Control Constructs | Branching and looping constructs | See Flow Control Constructs |
Calling Functions and Subroutines | Calling functions and subroutines: both those you've written, and those built in | See Calling Functions and Subroutines |
Built-in Routines | Routines provided by NewBASIC | See Built-in Routines and Operators |
Components | Summary of syntax for manipulating components, properties, actions, and events | See Components: Summary of Syntax |
Modules | Managing programs with source code in more than one file | See Loading Modules |
Construct | Description | Page |
---|---|---|
IF-THEN | constructs allow for simple branching | See IF-THEN-ELSE IF-ELSE-END IF |
FOR-NEXT | loops allow you to repeat a group of BASIC statements a set number of times | See FOR-TO-STEP-EXIT FOR-NEXT- |
DO-LOOPS | allow you to repeat a group of statements until some condition is met | See DO-WHILE-EXIT DO-LOOP-UNTIL- |
SELECT-CASE | constructs allow you to execute one of several groups of statements based upon the value of some variable | See SELECT CASE-CASE-CASE ELSE-END SELECT |
GOTO | jumps to a label within the routine | See GOTO ... |
To select a component, click it with the mouse.
To change... | Method of changing component | ||||
---|---|---|---|---|---|
position | Select and click-drag it. If you drag it within the bounds of a Group, Dialog, Clipper, Form, or Floater, it will become a child of that Group, Dialog, Clipper, Form, or Floater. | ||||
size | Select it, then position the mouse pointer close to its edge. The mouse pointer picture changes to an arrow. Click-drag to change the size. | ||||
properties | Bring up the Properties Box by choosing Component Properties from the Window menu. For more information, see Properties Box. | ||||
handler | Bring up the Editor window (double-click the component or choose Editor from the Window menu). For more information about using the Editor window, see The Editor Window. |
To change... | Method of changing component | ||||
---|---|---|---|---|---|
position | Select and click-drag it. If you drag it within the bounds of a Group, Dialog, Clipper, Form, or Floater, it will become a child of that Group, Dialog, Clipper, Form, or Floater. | ||||
size | Select it, then position the mouse pointer close to its edge. The mouse pointer picture changes to an arrow. Click-drag to change the size. | ||||
properties | Bring up the Properties Box by choosing Component Properties from the Window menu. For more information, see Properties Box. | ||||
handler | Bring up the Editor window (double-click the component or choose Editor from the Window menu). For more information about using the Editor window, see The Editor Window. |
CONST WHITE |
&Hffffffff |
CONST BLACK |
&Hff000000 |
CONST GRAY_50 |
&Hff808080 |
CONST GREY_50 |
&Hff808080 |
CONST DARK_GRAY |
&Hff555555 |
CONST LIGHT_GRAY |
&Hffaaaaaa |
CONST DARK_GREY |
&Hff555555 |
CONST LIGHT_GREY |
&Hffaaaaaa |
CONST DARK_GREEN |
&Hff00aa00 |
CONST LIGHT_GREEN |
&Hff55ff55 |
CONST DARK_BLUE |
&Hff0000aa |
CONST LIGHT_BLUE |
&Hff5555ff |
CONST DARK_CYAN |
&Hff00aaaa |
CONST LIGHT_CYAN |
&Hff55ffff |
CONST DARK_PURPLE |
&Hffaa00aa |
CONST LIGHT_PURPLE |
&Hffff55ff |
CONST DARK_ORANGE |
&Hffaa5500 |
CONST LIGHT_ORANGE |
&Hffff5555 |
CONST YELLOW |
&Hffffff55 |
CONST RED |
&Hffaa0000 |
The function of the Builder's tools are described in more detail in this table.
Builder Tool | What this does |
---|---|
Toolbox (also known as the Component Palette) |
The Toolbox contains buttons which allow you to add new components to your application. For example, a button is a simple component that you will add to a form--it detects when the user clicks it, and alerts your program. |
Form | The Form is the working area where you add the components with the Toolbox.You will add components such as buttons, text entries, and labels. |
Main Window | The main window contains menus and buttons which let you debug, save, edit, pause, and track your work. You compile and run the program you are writing, from this window. |
Properties Box | This window comes up when you click the main window's Window, Properties menu. It allows you to set different starting properties for your components. For example, if you want a button to always close the window when it is clicked, you can set that up here. |
Editing Window | This window, often called the Code Editor, is where you actually type in the NewBASIC programming commands which tell your buttons and windows what to do when a user interacts with them. |
Change the values to the following.
Button Properties | |||||
---|---|---|---|---|---|
Component | Property Field | Value | Component | Property Field | Value |
Button1 |
Name | letsgo | Button4 |
Name | Forward |
Proto | letsgo | Proto | Forward | ||
Caption Text | Let's Go! | Caption Text | Forward--> | ||
Left | 5 | Left | 236 | ||
Top | 44 | Top | 136 | ||
Width | 74 | Width | 54 | ||
Height | 24 | Height | 24 | ||
Specific | default | Specific | default | ||
Button2 |
Name | nah | Button5 |
Name | Home |
Proto | nah | Proto | Home | ||
Caption Text | Nah, I'll come back later | Caption Text | Home | ||
Left | 90 | Left | 100 | ||
Top | 44 | Top | 136 | ||
Width | 144 | Width | 54 | ||
Height | 24 | Height | 24 | ||
Specific | closeDialog | Specific | nothing | ||
Button3 |
Name | Back | Button6 |
Name | Endbutton |
Proto | Back | Proto | Endbutton | ||
Caption Text | <--Back | Caption Text | End | ||
Left | 28 | Left | 170 | ||
Top | 136 | Top | 136 | ||
Width | 54 | Width | 54 | ||
Height | 24 | Height | 24 | ||
Specific | nothing | Specific | nothing |
For each of the matching buttons on forms three and four, specify the same properties.
Other Components | |||||
---|---|---|---|---|---|
Component | Property Field | Value | Component | Property Field | Value |
Text1 |
Name | text | Form1 |
Name | form1 |
Proto | text1 | Proto | form1 | ||
Caption Text | -- | Caption Text | TurboTalk | ||
Left | 23 | Left | 200 | ||
Top | 43 | Top | 100 | ||
Width | 300 | Width | 250 | ||
Height | 72 | Height | 100 | ||
Label1 |
Name | label | Form2 |
Name | TurboTalk |
Proto | label1 | Proto | TurboTalk | ||
Caption Text | Welcome to TurboTalk! | Caption Text | TurboTalk | ||
Left | 5 | Left | 200 | ||
Top | 18 | Top | 100 | ||
Width | 150 | Width | 350 | ||
Height | 16 | Height | 200 | ||
Label2 |
Name | label2 | |||
Proto | label2 | ||||
Caption Text | Slide 1 | ||||
Left | 144 | ||||
Top | 18 | ||||
Width | 54 | ||||
Height | 12 |
button pressed event | code to enter | comments |
---|---|---|
Forward | sub |
This makes the next slide appear. However, we don't want the End button to appear when it is already on Slide 2. Likewise, we don't want the user to see the Home button if they are already on Slide 1. Also, we don't want the user to keep clicking Forward when he is on the last slide, so we provide a help message. However, we want the message to appear only when the user clicks an extra time. We must clear the message other times. There are two If -- then statements in here. |
Back | sub Back_pressed(self as button) |
This makes the previous slide appear. However, we don't want the End button to appear when it is already on Slide 2. Likewise, we don't want the user to see the Home button if they are already on Slide 1. Also, we don't want the user to keep clicking Back when he is on the first slide, so we provide a help message. However, we want the message to appear only when the user clicks an extra time. We must clear the message other times. There are two If -- then statements in here. |
Home | sub Home_pressed(self as button) |
This brings the user to Slide 1, the first slide of the presentation. However, we don't want the End button to appear when it is already on Slide 2. Likewise, we don't want the user to see the Home button if they are already on Slide 1. There is only one If -- then statement in here. |
Endbutton | sub endbutton_pressed(self as button) |
This brings the user to Slide 2, the last slide of this presentation. However, we don't want the End button to appear when it is already on Slide 2. Likewise, we don't want the user to see the Home button if they are already on Slide 1. There is only one If -- then statement in here. |
Return to the Edit window and highlight and edit the following routines:
routine | code to enter | comments |
module_exit | sub module_exit( ) |
This hides the entire module. |
module_show | sub module_show( ) |
This shows what would appear when the module is started. |
module_hide | sub module_hide( ) |
This hides the entire module. |
module_init | sub module_init( ) |
This shows the small welcome window and hides the main window. |