canvasLabel(3tk)
π canvasLabel(3tk) β the manual page but make it a group chat π
okay so bestie, you opened the canvasLabel(3tk) page and honestly? it's giving "tiny widget, big personality." let's get into it, no cap. π
β¨ NAME β¨
canvasLabel β the tkpiechart canvas label class. that's it, that's the whole name section, she's concise and she's iconic. π
πΈ SYNOPSIS πΈ
package require stooop 4.1
package require switched 2.2
package require tkpiechart 6.6
stooop::new canvasLabel canvas ?options?
switched::configure canvasLabelObject ?options?
switched::cget canvasLabelObject option
stooop::delete canvasLabelObject
like yes, you need stooop 4.1, switched 2.2 and tkpiechart 6.6 first. prerequisites, babe. π«Ά
π¦ DESCRIPTION π¦
so the canvasLabel class literally brings some Tk label widget functionality over to the canvas text item β we're talking a background and a border, the glow-up essentials. β¨
the canvasLabel is built with a bullet rectangle on the left side of the text. the relief changes according to the select state, and when it's selected it gets a traditionally sunken relief. it's giving "pressed and proud." π
and the label has a specific tag, which you can use to retrieve the coordinates of the object or move it β thanks to the canvas facilities. main character energy, honestly. π
π the four calls you'll be doing
stooop::new canvasLabel canvas ?options?
Creates a canvasLabel object in the specified Tk canvas. The canvasLabel object identifier is returned β and that's what this whole document calls canvasLabelObject. remember that name, she comes up a lot. π
switched::configure canvasLabelObject ?options?
Configures a canvasLabel object, or returns all the options with their current values if you don't pass any options as parameters. no options? she just tells you everything. oversharing queen. π
switched::cget canvasLabelObject option
Returns an option value for the specified canvasLabel object. one option, one answer. π
stooop::delete canvasLabelObject
Deletes the specified canvasLabel object. bye bestie ππ
π OPTIONS π
okay here's the full roster, all 17 of them, no skipping, we do not leave anyone on read:
-anchorvalue β Specifies the anchor position of the rectangle and the text, relative to the positioning point. The behavior is similar to the-anchoroption of the canvas text item, except that the rectangle is taken into account. The default iscenter. π―-backgroundcolor β Specifies the background color of the bullet rectangle, as in the-filloption of the canvas rectangle item. The default is transparent (that's an empty string, fr). π«₯-bordercolorcolor β Specifies the border color of the rectangle, as in the-outlineoption of the canvas rectangle item. The default isblack. π€-borderwidthvalue β Specifies the border width of the rectangle, as in the-widthoption of the canvas rectangle item. By default, the width is1pixel, which is the minimum width. no thinner than that, bestie. π-bulletwidthvalue β Specifies the width of the rectangle placed to the left of the text. Defaults to10. π«β¨-fontvalue β Specifies the font of the text, as in the-fontoption of the canvas text item. The default is system dependent. so like, whatever your machine woke up feeling today. π-foregroundcolor β Specifies the color of the text, as in the-filloption of the canvas text item. The default isblack. π€-justifyvalue β Specifies how to justify the text, as in the-justifyoption of the canvas text item. The default isleft. β¬ οΈ-minimumwidthvalue β The total label width will not go below the specified value, but may be larger if the label text requires it. so it's a floor, not a ceiling. π§±-paddingvalue β Specifies how much space to leave between the text and the closest rectangle edge. Units are identical to those specified in the canvasCOORDINATESmanual section. π-scalelist β List of 2 floating point numbers used to set the scaling factor in the x and y axis. Scaling is applied immediately and defaults to1. βοΈ-selectboolean β Sets the label state. ποΈ-selectreliefvalue β Eitherflat,raisedorsunken. Specifies the 3D effect desired for the text area when the label is selected. π§-stipplebitmap β Specifies the stipple pattern filling the rectangle, as in the-stippleoption of the canvas rectangle item. There is no bitmap by default. π³οΈ-texttext β Specifies the string to be displayed in the text area, as in the-textoption of the canvas text item. The default is an empty string. π€-textbackgroundcolor β Specifies the color of the text area background. π¨-widthvalue β Specifies a maximum line length for the text, as in the-widthoption of the canvas text item. The default is0. β‘οΈ
π·οΈ TAGS π·οΈ
the labeler has the following specific tag β see the canvas manual page ITEM IDS AND TAGS section for more info, iykyk:
canvasLabel(canvasLabelObject)
π BUGS, IDEAS, FEEDBACK π
ngl, this document, and the package it describes, will undoubtedly contain bugs and other problems. it's not a vibe, it's just true. π
Please report such in the category tkpiechart of the Tklib Trackers at http://core.tcl.tk/tklib/reportlist.
Please also report any ideas for enhancements you may have for either package and/or documentation. we love a suggestion box moment. π
π SEE ALSO π
piepieBoxLabelerpiePeripheralLabeler
π KEYWORDS π
canvas, labeler, pie, slice
π COPYRIGHT π
Copyright (c) 1995-2004 Jean-Luc Fontaine <jfontain@free.fr>
and that's the whole page bestie, you ate it. π«Ά this was tklib version 6.6 β go forth and label your canvases, periodt. πβ¨π
π¦ where this page comes from
- debian trixie: tklib 0.9-1
- ubuntu questing: tklib 0.9-1
- ubuntu resolute: tklib 0.9-1build1
- ubuntu stonking: tklib 0.9-1build1
- Copyright (c) 1995-2004 Jean-Luc Fontaine <jfontain@free\&.fr>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms