This module implements the actual interface to tk.
Start the etk server, possible options are
{withdrawn, Bool}
{name, Name}
{display, Display}
{driver, "etk_drv"}
Will start the etk interface as a linked in driver for
improved performance.
Stops the etk server and terminates all windows.
Links the calling process to the widget Path
wunlink(Path)
wunlink(Pid, Path)
Unlinks the calling process from the widget Path
Join a distributed widget group
Leave a distributed widget group.
Create a button, for all options see, button.n.html
Example:
Self= self(), Quit = etk:button(Top,[{text,"quit"},{anchor,w}, {command, fun() -> exit(Self, die) end}]),
Create a canvas, for all options see, canvas.n.html
Example:
Canvas = etk:canvas(Top, []),
Create a checkbutton, for all options see, checkbutton.n.html
Example:
Cb = etk:checkbutton(Top, [{text,"Bold"},{anchor,"w"}]),
Create an entry, for all options see, entry.n.html
Example:
E = etk:entry(Top, [{relief sunken}, {font, Font}])
Create a frame, for all options see, frame.n.html
Example:
Frame = etk:frame(Top, [{width,"15m"},{height,"10m"}]),
Create a label, for all options see, label.n.html
Example:
L = etk:label(Top, [{text, "Label #3"}, {background, green}]),
Create a listbox, for all options see, listbox.n.html
Example:
ListBox = etk:listbox(Top, []),
Create a menu, for all options see, menu.n.html
Create a menubutton, for all options see, menubutton.n.html
Create a message widget, for all options see, message.n.html
Create a radiobutton, for all options see, radiobutton.n.html
Create a scale widget, for all options see, scale.n.html
Example:
Scale = etk:scale(Top, [{label,"Flow"},{from,-1000},{to,1000}, {command, fun(S) -> io:format("Scale = ~w~n", [S]) end}]),
Create a scrollbar widget, for all options see, scrollbar.n.html
Example:
Create a text widget, for all options see, text.n.html
Example:
Create a toplevel widget, for all options see, toplevel.n.html
Example:
Ring the bell
bindtags(Win)
bindtags(Win, Options)
Bind tags in window according to Options
Example:
Destroy a window.
Set the current focus to Win.
Lower window.
Raise window.
Return a list of events that are bound to Win.
Example:
Return a a Fun if a Fun is bound to the event Event
or nil
of nothing is bound to trigger on the event
Event
in Win.
bind(Win, Event, Template, Fun)
Set the function Fun
to evaluate on the event
Event
in the window.
See also bind.n.html
Example:
Unbind the function the is bound to an event.
Unbind the function the is bound to an event.
Return a list of the events bound to tag.
Return the Fun that is bound to Tag and Event, or nil
of nothing is bound.
bind_tag(Win, Tag, Event, Template, Fun)
Bind Fun
to Tag
and Event
See also bindtags.n.html
Example:
Unbind the Fun
associated with Tag
and Event
Return a list of the events bound to canvas tag.
Return the Fun that is bound to canvas widget
Tag and Event, or nil
of nothing is bound.
bind_ctag(Win, Tag, Event, Template, Fun)
Bind Fun
to canvas widget Tag
and Event
Example:
Unbind the Fun
associated with canvas widget
Tag
and Event
pack(Wslist)
pack(Window, Options)
Invoke the packer. See also pack.n.html
Example:
place(Wslist)
place(Window, Options)
Invoke the placer. See also place.n.html
grid(Wslist)
grid(Window, Options)
Invoke the grid geometry manager. See also grid.n.html
Example:
Other commands, i.e. "appname" See also tk.n.html
The wm command, See also wm.n.html
Example:
The update command.
selection(Opts)
rselection(Opts)
The (raw) selection command. See selection.n.html
Raw means that no type interpretation is done on the data at all, this is necessary for certain data such as "1.2" which otherwise is interpreted as a float.
The clipboard command. See clipboard.n.html
The grab command. See grab.n.html
The option command. See option.n.html as well as the general options page GetOption.3.html
Example:
The image command. See image.n.html
Example:
Return window-related information. See winfo.n.html
Example:
The widget command.
Example:
The raw widget command.
Set variable Var
to value Value
.
Set balue of variable Var
.
Shortcut for
winfo([parent, W]).
Shortcut for
winfo([toplevel, W]).
Shortcut for
winfo([children, W]).
Shortcut for
winfo([class, W]).
Invokes the command "cget" on the widget W
Example:
Invokes the "raw" command "cget" on the widget W
Invokes the command "configure" on the widget W
Example:
tkStrictMotif()
tkStrictMotif(Bool)
Queries respective sets the property "strictMotif"