TextboxColor$

From Liberty BASIC Family
Jump to navigation Jump to search
Supported in Just BASIC Supported in Liberty BASIC Not supported in Liberty BASIC 5 Not supported in Run BASIC

Description

Sets the background color of a text-box to one of the named colors.

Syntax

The variable is case sensitive.
  1. TextboxColor$ = "named Color"

Hints

Placing the statement. The TextboxColor$ value can be changed between each control statement. A text-box will be colored according to the last color statement issued before the command to create the text-box. Background colors are set before the GUI window is opened and cannot be changed after the window is opened.
Colors. The color variables used for GUI controls can only use named colors.

Example

nomainwin
    WindowWidth = 300
    WindowHeight = 370

    TextboxColor$ = "red"
    textbox #main.textbox1, 30, 16, 100, 25
    TextboxColor$ = "blue"
    textbox #main.textbox2, 30, 61, 100, 25

    TextboxColor$ = "yellow"
    textbox #main.textbox3, 30, 121, 100, 25
    TextboxColor$ = "buttonface"
    textbox #main.textbox4, 30, 175, 200, 25

    open "Textbox Background Color" for window as #main
    #main "trapclose [quit]"

[main.inputLoop]   'wait here for input event
    #main.textbox4 "This is buttonface."
    wait

[quit]
    close #main
    end

Useful Procedures

' Place a useful function or sub using this keyword here