class PtGrid PtBasic { dash_list; // char array (Pt_ARG_DASH_LIST) dash_scale; // long (Pt_ARG_DASH_SCALE) grid_horizontal; // unsigned short (Pt_ARG_GRID_HORIZONTAL) grid_vertical; // unsigned short (Pt_ARG_GRID_VERTICAL) line_cap; // unsigned short (Pt_ARG_LINE_CAP) line_join; // unsigned short (Pt_ARG_LINE_JOIN) line_width; // long (Pt_ARG_LINE_WIDTH) }
This widget is a grid of horizontal and vertical lines.
![]() | For detailed information, please refer to PtGrid in the Photon documentation. |
This variable is identical to the dash_list variable of PtGraphic widget.
This variable is identical to the dash_scale variable of PtGraphic widget.
An integer specifying the number of horizontal grid lines. Default is 4.
An integer specifying the number of vertical grid lines. Default is 4.
This instance variable determines the shape of line ends (mainly visible for wide lines), and may have one of the following values:
This instance variable determines the shape of line joints (mainly visible for wide lines), and may have one of the following values:
A number specifying the width of the grid lines, in pixels.
This example, ex_PtGrid.g, is included in the gamma_ph_#_examples_1_QNX4.tgz file available on the Cogent Web Site.
#!/usr/cogent/bin/phgamma
/*
* This example demonstrates a PtGrid.
*/
require_lisp("PhotonWidgets.lsp");
PtInit(nil);
win = new(PtWindow);
grid = new(PtGrid);
grid.SetDim(350,350);
grid.fill_color = 0xccddff;
grid.grid_vertical = 12;
grid.grid_horizontal = 20;
grid.line_width = 1;
PtRealizeWidget(win);
PtMainLoop();