Is the checkbox object defined in the GoJS help?

Searching the site I’ve seen a few pages that have checkboxes, but in the API documentation I don’t see it described in detail.

I see a lot of examples containing this:

              $("CheckBox", "choice3",
                { "ButtonIcon.stroke": "red", "ButtonIcon.figure": "XLine" },
                $(go.TextBlock, "red X")

But I’m not seeing a page that describes, for $(arg1, arg2, arg3, arg4)

  • What are the valid values for arg1? What is its type, where are they defined?
  • What is arg2? A unique identifier?
  • For arg3, what are the valid values? It appears to be a set of styles and properties, but not seeing it.
  • Arg4 appears to be what comes after the checkbox, and is another control.

If this was described in the docs it would make life easier. Not really interested in reverse engineering the code, prefer to treat it as a black box.

Thank you!


If you look at any sample, you will see that “$” is just the GraphObject.make static function: GraphObject | GoJS API

Basically the first argument must be either a class or a string builder name defined by GraphObject | GoJS API. The latter lists all of the pre-defined builders, but you can define your own.

The rest of the arguments are initializers for the object being made.

For Panels, that may include other GraphObjects, which are added to the panel by calling Panel.add.

If you haven’t already read GoJS Building GraphObjects -- Northwoods Software, please do so. You don’t have to use GraphObject.make ( GoJS Building GraphObjects -- Northwoods Software ) if you don’t want to. You might find GoJS Building GraphObjects -- Northwoods Software more natural, and you’ll probably get more help from editor tools that read the TypeScript go.d.ts file and provide suggestions/alternatives as you type.

For descriptions of different types of buttons, read: GoJS Buttons -- Northwoods Software