bdeSetPortBackgroundColor
Sets the background color of a port.
Syntax
bdeSetPortBackgroundColor(port, color)
bdeSetPortBackgroundColor(port, red, green, blue, alpha)
Inputs
- port
- The port that will it's background color set.
- color
- Name of the color to set the port background color to. Can also use color of type hwt::Color.
- red
- Value to set the port red background color value to. Values can range from 0-255.
- green
- Value to set the port green background color value to. Values can range from 0-255.
- blue
- Value to set the port blue background color value to. Values can range from 0-255.
- alpha
- Transparency to set the port background color to. Values can range from 0-255.
Examples
diagram = bdeGetCurrentDiagram();
block = bdeGetSelectedBlock(diagram);
portList = bdeGetPortsOnBlock(block);
portX = portList{[1, 1]};
bdeSetPortBackgroundColor(portX, 255, 0, 0, 255);
diagram = bdeGetCurrentDiagram();
block = bdeGetSelectedBlock(diagram);
portList = bdeGetPortsOnBlock(block);
portX = portList{[1, 1]};
bdeSetPortBackgroundColor(portX, 'red');