summaryrefslogtreecommitdiffstats
path: root/doc/systray.n
blob: c47883ba8562b84b08a33e1ec4653f447fa1fbcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.\" Text automatically generated by txt2man
.TH untitled  "03 October 2020" "" ""
.RS
systray n "" Tk "Tk Built-In Commands"
.SH NAME
\fBsystray \fP- Creates an icon display in the platform-specific system tray.
\fB
.SH SYNOPSIS
.nf
.fam C

\fBsystray\fP \fIcreate\fP \fIimage?\fP? \fItext?\fP? \fIcallback?\fP?
\fBsystray\fP \fImodify\fP \fIoption?\fP?
\fBsystray\fP \fIdestroy\fP

.fam T
.fi
.fam T
.fi
.SH DESCRIPTION

The \fBsystray\fP command creates an icon in the platform-specific tray. The widget is configured with a Tk \fIimage?\fP for the icon display, a string for display in a tooltip, and a \fIcallback?\fP is bound to <Button-1>.
.SH EXAMPLE

Here is an example of the \fBsystray\fP code:
.PP
.nf
.fam C
    image create photo book -data R0lGODlhDwAPAKIAAP//////AP8AAMDAwICAgAAAAAAAAAAAACwAAAAADwAPAAADSQhA2u5ksPeKABKSCaya29d4WKgERFF0l1IMQCAKatvBJ0OTdzzXI1xMB3TBZAvATtB6NSLKleXi3OBoLqrVgc0yv+DVSEUuFxIAOw==
    systray create -image book -text "Systray sample" -callback {puts "Here is the systray output"}

.fam T
.fi
Here is an example of modifying the \fBsystray\fP icon:
.PP
.nf
.fam C
    image create book_page -data R0lGODlhCwAPAKIAAP//////AMDAwICAgAAA/wAAAAAAAAAAACwAAAAACwAPAAADMzi6CzAugiAgDGE68aB0RXgRJBFVX0SNpQlUWfahQOvSsgrX7eZJMlQMWBEYj8iQchlKAAA7
    systray modify -image book_page 
    systray modify -text "Updated sample"
    systray modify -callback {puts "Different output from the systray"}

.fam T
.fi
.SH KEYWORDS

\fIimage?\fP, \fIcallback?\fP