^GB Graphic Box
Draws a box or a line: width, height, border thickness, colour and rounding.
Graphics · Updated 2026-10-20
Syntax
^GBw,h,t,c,r
Parameters
| Parameter | What it does | Values |
|---|---|---|
w | Box width, in dots. | thickness to 32000 |
h | Box height, in dots. | thickness to 32000 |
t | Border thickness, in dots. | 1 to 32000; default 1 |
c | Colour. | B = black, W = white; default B |
r | Corner rounding. | 0 to 8; default 0 |
Common mistakes
- A line is a box with one side as thick as the border. A filled box has a border as thick as its smaller side.
Example
Edit the code and the label redraws. This is the same engine as the API.
Questions
What does ^GB do in ZPL?
Draws a box or a line: width, height, border thickness, colour and rounding.
What is the syntax of ^GB?
^GBw,h,t,c,r
What should I watch out for with ^GB?
A line is a box with one side as thick as the border. A filled box has a border as thick as its smaller side.