Authored by Nonki Takahashi
Last and this month, controls challenges are going in the Challenge of the Month . So today, I'd like to write about Controls.
There are three controls in Small Basic - button, text input box and multi-line text input box. Following sample screen shots are from a program Dictionary 1.2b ( ZRS542-0 ).
If this control has a long text, scroll bars appear like following screen shot. Scroll bar is another control.
Other controls in Small Basic? We can write code for them. Here are many samples in Challenge of the Month .
This password control ( LXM256 ) is published by Alexwarrington .
This is another password control ( CND797 ) by WhTurner33 .
This is a fancy button sample (GGL988) by litdev . And this program is also a sample for switching between read only and read/write text input box. Great!
This control ( HZV539-0 ) is originally written by Pappa Lapub . I modified not to rotate image but to move red dot. Anyway, it's cool. You need the rotary knob image for this program.
This is very simple version of read only text box by NaochanON .
Msg
=
"This is read only"
box
=
Controls
.
AddTextBox
(
20
,
20
)
Controls
.
SetTextBoxText
(
box
,
msg
)
Msg2
=
"This is editable"
box2
=
Controls
.
AddTextBox
(
20
,
50
)
Controls
.
SetTextBoxText
(
box2
,
msg2
)
GraphicsWindow
.
Keyup
=
Onkeyup
Sub
onkeyup
txt
=
Controls
.
GetTextBoxText
(
box
)
If
txt
<
>
Msg
Then
GraphicsWindow
.
ShowMessage
(
"Sorry, This is Read Only"
,
"error"
)
Controls
.
SetTextBoxText
(
box
,
msg
)
EndIf
EndSub
This another control ( WZH765-0 ) is written by Jibba Jabba .
This program ( KMG391-0 ) is written by Nonki Takahashi (me!).
This control ( DST499 ) is published by OzJerry .
This program ( XZB099 ) is written by Nonki Takahashi (again).
This selector ( QMD177 ) is written by Jibba Jabba again.
This program ( SXD381-0 ) is written by Jibba Jabba also.
This program ( BGF911-1 ) is also written by Jibba Jabba. Wow! Lot of works!
This control ( WMK208-0 ) is written by Pappa Lapub also.
I wrote about the other controls in a TechNet Wiki article Small Basic: Controls .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.