Check-in [4b8178d136]

Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update 262 based on experience while writing the implementation
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4b8178d136a89cafaaa05a1f90d7249fc402861b0301b4a97826d88641d9da78
User & Date: dkf 2019-04-12 12:38:39
Context
2019-04-12
13:00
New state of tip510. oo::clas like widgets, dynamic configure, additional widgets check-in: 9a757d6209 user: rene tags: trunk
12:38
Update 262 based on experience while writing the implementation check-in: 4b8178d136 user: dkf tags: trunk
12:33
Added impl link for 262 check-in: 45c21d6c8e user: dkf tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tip/262.md.

9
10
11
12
13
14
15
16

17
18
19
20
21
22
23
..
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
	Keywords:       Tk,option
	Tcl-Version:    8.7
	Tk-Branch:      tip-262
-----

# Abstract

This TIP proposes an option for frames that allows users to set the

background of the window to be an image.

# Rationale

Just a there is an **-image** option for **button** widgets, this
TIP suggests that a **-backgroundimage** option for frames be
implemented. The image should be either an entire single image, or a
................................................................................
the frame.

If the image was tiled, then it should be re-tiled as needed during a
resize. The image would reside behind any other decoration or other
widgets that resided in the frame. The image should be re-configurable
to replace the image and/or remove it, as with a button image.

This TIP should allow some rather classy looking tcl/tk programs to be
created with much ease.

# Proposed Change

Two new options are proposed for **frame** widgets, to be
manipulated using the normal **configure** and **cget** methods:

 * **-backgroundimage** _imageName_ - This gives the name of an
   image \(as created by **image create**\) that is to be painted onto
   the widget immediately after the painting of the solid background
   colour. If _imageName_ is the empty string \(the default\) no image
   will be painted. The painting of the image will be controlled by
   the **-tile** option.

 * **-tile** _boolean_ - If this option gives _boolean_ as true,
   the image will be painted such that the top-left corner corresponds
   to the top-left corner of the frame, and then subsequently
   repeatedly painted \(with no gaps between the areas painted\) to the
   right and below that initial painting until such time as the entire
   widget is covered by copies of the image. If this option gives
   _boolean_ as false, the image will only be painted once, such
   that the center of the image painted is coincident with the center
   of the frame widget.




# Implementation

See the [tip-262 branch](https://core.tcl-lang.org/tk/timeline?r=tip-262).

# Copyright

This document has been placed in the public domain.







|
>







 







|




|











|





|
>
>
>









9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
..
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
	Keywords:       Tk,option
	Tcl-Version:    8.7
	Tk-Branch:      tip-262
-----

# Abstract

This TIP proposes an option for frames and toplevels (on the grounds
that they're virtually the same thing internally) that allows users to set the
background of the window to be an image.

# Rationale

Just a there is an **-image** option for **button** widgets, this
TIP suggests that a **-backgroundimage** option for frames be
implemented. The image should be either an entire single image, or a
................................................................................
the frame.

If the image was tiled, then it should be re-tiled as needed during a
resize. The image would reside behind any other decoration or other
widgets that resided in the frame. The image should be re-configurable
to replace the image and/or remove it, as with a button image.

This TIP should allow some rather classy looking Tcl/Tk programs to be
created with much ease.

# Proposed Change

Two new options are proposed for **frame** and **toplevel** widgets, to be
manipulated using the normal **configure** and **cget** methods:

 * **-backgroundimage** _imageName_ - This gives the name of an
   image \(as created by **image create**\) that is to be painted onto
   the widget immediately after the painting of the solid background
   colour. If _imageName_ is the empty string \(the default\) no image
   will be painted. The painting of the image will be controlled by
   the **-tile** option.

 * **-tile** _boolean_ - If this option gives _boolean_ as true,
   the image will be painted such that the top-left corner corresponds
   to the top-left corner of the frame (inside any border), and then subsequently
   repeatedly painted \(with no gaps between the areas painted\) to the
   right and below that initial painting until such time as the entire
   widget is covered by copies of the image. If this option gives
   _boolean_ as false, the image will only be painted once, such
   that the center of the image painted is coincident with the center
   of the frame widget. The default will be **false**.

For convenience, an alias for **-backgroundimage** will also be
provided: **-bgimg**

# Implementation

See the [tip-262 branch](https://core.tcl-lang.org/tk/timeline?r=tip-262).

# Copyright

This document has been placed in the public domain.