Graphics Commands
^GB - Graphic Box
Draws boxes, lines, and rectangles
^GB - Graphic Box
Overview
The ^GB command draws rectangular boxes, lines, and other rectangular graphics on the label.
Syntax
^GBw,h,t,c,r
Parameters
- w = Box width in dots
- h = Box height in dots
- t = Border thickness in dots
- 0 = No border
- 1-n = Line thickness
- c = Line color
- B = Black (default)
- W = White
- r = Corner rounding (dots, optional)
- 0 = Square corners (default)
- 1-n = Rounded corner radius
Description
- Creates rectangular graphics
- Draws lines and borders
- Supports variable thickness
- Can create rounded corners
- Useful for visual formatting
Usage Notes
- Place with ^FO before using
- Width and height in dots
- Thickness 0 creates outline only
- Both filled and hollow boxes supported
- Color affects appearance on label
Example
^XA ^FO50,50 ^GB400,200,10,B ^FS ^FO100,100 ^GB200,100,2,B ^FS ^XZ
Creating Different Shapes
| Width | Height | Type | Usage |
|---|---|---|---|
| 200 | 2 | Horizontal line | Separator |
| 2 | 200 | Vertical line | Border |
| 200 | 100 | Rectangle | Box |
| 200 | 200 | Square | Frame |
Thickness Guidelines
| Thickness | Usage |
|---|---|
| 0 | Outline only |
| 1-2 | Thin line |
| 3-5 | Medium line |
| 5+ | Thick line |
Rounded Corners
^GB200,100,2,B,10 # 10-dot radius corners
^GB200,100,2,B,0 # Sharp cornersRelated Commands
^GC- Graphic Circle^GE- Graphic Ellipse^GD- Graphic Diagonal Line^GF- Graphic Field