File: ScrolledCanvas_text.py

package info (click to toggle)
python-pmw 2.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,968 kB
  • sloc: python: 42,737; makefile: 4
file content (118 lines) | stat: -rw-r--r-- 3,520 bytes parent folder | download | duplicates (2)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
complete = 1
reviewdate = "20 September 1998"

name = """
    canvas with optional scrollbars
"""

description = """
    A scrolled canvas consists of a standard canvas widget with optional
    scrollbars which can be used to scroll the canvas.  The scrollbars
    can be 'dynamic', which means that a scrollbar will only be
    displayed if it is necessary, that is, if the scrollregion of the
    canvas is larger than the canvas.

"""

text = {}
text['options'] = {}

text['options']['borderframe'] = """
    If true, the *borderframe* component will be created.

"""

text['options']['canvasmargin'] = """
    The margin around the items in the canvas.  Used by the
    *resizescrollregion()* method.

"""

text['options']['hscrollmode'] = """
    The horizontal scroll mode.  If *'none'*, the horizontal scrollbar
    will never be displayed.  If *'static'*, the scrollbar will always
    be displayed.  If *'dynamic'*, the scrollbar will be displayed
    only if necessary.

"""

text['options']['scrollmargin'] = """
    The distance between the scrollbars and the enclosing canvas
    widget.

"""

text['options']['usehullsize'] = """
    If true, the size of the megawidget is determined solely by the
    width and height options of the *hull* component.

    Otherwise, the size of the megawidget is determined by the width
    and height of the *canvas* component, along with the size and/or
    existence of the other components, such as the label, the
    scrollbars and the scrollmargin option.  All these affect the
    overall size of the megawidget.

"""

text['options']['vscrollmode'] = """
    The vertical scroll mode.  If *'none'*, the vertical scrollbar
    will never be displayed.  If *'static'*, the scrollbar will always
    be displayed.  If *'dynamic'*, the scrollbar will be displayed
    only if necessary.

"""

text['components'] = {}

text['components']['borderframe'] = """
    A frame widget which snuggly fits around the canvas, to give the
    appearance of a canvas border.  It is created with a border so
    that the canvas, which is created without a border, looks like it
    has a border.

"""

text['components']['canvas'] = """
    The canvas widget which is scrolled by the scrollbars.  If the
    *borderframe* option is true, this is created with a borderwidth
    of *0* to overcome a known problem with canvas widgets:  if a
    widget inside a canvas extends across one of the edges of the
    canvas, then the widget obscures the border of the canvas. 
    Therefore, if the canvas has no border, then this overlapping does
    not occur.

"""

text['components']['horizscrollbar'] = """
    The horizontal scrollbar.

"""

text['components']['vertscrollbar'] = """
    The vertical scrollbar.

"""

text['methods'] = {}

text['methods']['bbox'] = """
    This method is explicitly forwarded to the *canvas* component's
    /bbox()/ method.  Without this explicit forwarding, the /bbox()/
    method (aliased to /grid_bbox()/) of the *hull* would be invoked,
    which is probably not what the programmer intended.

"""

text['methods']['interior'] = """
    Return the canvas widget within which the programmer should create
    graphical items and child widgets.  This is the same as
    /component(\\'canvas\\')/.

"""

text['methods']['resizescrollregion'] = """
    Resize the scrollregion of the *canvas* component to be the
    bounding box covering all the items in the canvas plus a margin on
    all sides, as specified by the *canvasmargin* option.

"""