Blitz3D+ Command Reference

SetPanelColor panel,red,green,blue

Parameters

panel - panel gadget

red,green,blue - background colour components, 0 to 255

Description

Fills a panel's background with a solid colour.

Requires Extended language mode.

Panels normally use the standard window background; a colour turns one into a swatch, a highlighted drop zone, or a tinted work area behind other gadgets. Values outside 0-255 are clamped, and setting a colour replaces any image previously set with SetPanelImage.

Splitter panes are panels too, so SetPanelColor works on the handles SplitterPanel returns. A neat editor trick is a small colour-preview panel driven by RequestColor:

If RequestColor() Then SetPanelColor swatch,RequestedRed(),RequestedGreen(),RequestedBlue()

See it working in the native input controls sample.

See also: SetPanelImage, CreatePanel, SplitterPanel, RequestColor.

Index