---
name: "gk_defaultMenu"
section: "3gk"
platform: "linux"
package: "groupkit"
version: "3.2-1"
release: "Debian 1.3 (Bo)"
platforms: ["linux"]
url: "https://new.carta.tech/gk_defaultMenu"
---

# gk\_defaultMenu(3gk)

Create a standard GroupKit menubar

## NAME

gk\_defaultMenu - Create a standard GroupKit menubar

## SYNOPSIS

- **gk\_defaultMenu** *pathname* ?*options*?

  ## STANDARD OPTIONS

```
activeBackground	bitmap	font	padY
activeForeground	borderWidth	foreground	relief
anchor	cursor	textVariable	text
background	disabledForeground	padX	underline
```

**See the \`\`options'' manual entry for details on the standard options.**

## DESCRIPTION

**This widget is a menu bar that contains pulldown menus.  By default** **the menubar contains three menus: File, Collaboration, and Help.** **Menus can be added and deleted from the menubar (see the Widget Command** **section).**

**Indices in the menubar may be either integer value or a character** **string.  The numeric values indicate the position of the menu, with** **0 being the leftmost menu.  The character strings are the names given** **to the various menus.  Either of these methods can be used to refer** **to the menu's.  However, it is probably less danger to use the numeric** **Indices since they will be unique values but the strings may or**  **may not be unique.  The menubar initally has a "File", "Collaboration"** **and "Help" menus which are at positions 0, 1 and 2 respectively. A** **nice way to check the positions and what the menu names are is with** **the itemlist command (see Widget Command section).**

## WIDGET COMMAND

**The gk\_defaultMenu** command creates a new Tcl command whose name is *pathName*.  This command may be used to invoke various operations on the widget.  It has the following general form:

-

  *pathName option* ?*arg arg ...*?

*Option* and the *arg*s determine the exact behavior of the command.  The following commands are possible for gk\_defaultMenu widgets:

- *pathName* **add** *name index*

  - *pathName* **configure** ?*option*? ?*value option value ...*?

  Query or modify the configuration options of the widget. If no *option* is specified, returns a list describing all of the available options for *pathName* (see **Tk\_ConfigureInfo** for information on the format of this list).  If *option* is specified with no *value*, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no *option* is specified).  If one or more *option-value* pairs are specified, then the command modifies the given widget option(s) to have the given value(s);  in this case the command returns an empty string. *Option* may have any of the values accepted by the **gk\_defaultMenu** command.

- *pathName* **delete** *index*

  Delete the item at position *index* on the menubar.

- *pathName* **index active**

  Set the item at position *index* as active.

- *pathName* **index configure** *?option? ?value option value...?*

  Works just like configure except it is for the item at *index*. See *pathName* **configure** for more details on how configure works.

- *pathName* **index deactivate**

  Set the item at position *index* as deactive, not useable.

- *pathName* **itemcommand** *index menuCommand*

  This command allows all of the normal operations to be executed on the menu fIindex.  Use this to add and delete entries on a menu as well as adding separators or any other of the usual functions. See the Tk Menu widget for more details.

- *pathName* **itemconfigure** *index ?menuOption? ?value menuOption value ...*

  Works just like configure except it is for a partiuclar entry on a the menu at *index*.  Refer to the Tk menu widget, in particular fIpathName **entryconfigure** for more details.

- *pathName* **itemList**

  Returns the list of indicies in string format for a particular menubar.   The position of the string index in this list is its numerical index.

## DEFAULT BINDINGS

The only default bindings are those that are automatically created for the menu buttons.

## NOTE

This widget is built using the GroupKit class builder; see the GroupKit User Manual for more information.

## AUTHOR

Shannon Jaeger (jaeger@cpsc.ucalgary.ca)
