ComboboxColor$

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 combobox to one of the named colors.

Syntax

The variable is case sensitive.

  1. ComboboxColor$ = "named Color"

Hints

Placing the statement. The ComboboxColor$ value can be changed between each control statement. A combobox will be colored according to the last color statement issued before the command to create the combobox. 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
a$(1) = "one"
a$(2) = "two"
a$(3) = "three"
a$(4) = "four"

ComboboxColor$ = "yellow"
combobox #win.combo, a$(),[doCombo],10,10,120,200

open "Combobox Demo" for window as #win
#win "trapclose [Quit]"
#win.combo "selectindex 1"

wait

[Quit] close #win:end

[doCombo]
#win.combo "selection? sel$"
notice "You chose ";sel$
wait

Useful Procedures

' Place a useful function using this keyword here