iwidgets::labeledframe(1)

πŸ’– iwidgets::labeledframe β€” the [incr Widgets] era πŸ’–

okay bestie, come sit with me because we're about to build the cutest little labeled frame you've ever seen. this is iwidgets::labeledframe from the one and only [incr Widgets] manual, section 1. πŸŽ€


✨ NAME ✨

iwidgets::labeledframe β€” create and manipulate a labeled frame widget. that's it, that's the job. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

iwidgets::labeledframe pathName ?options?

🌸 INHERITANCE 🌸

it's giving family tree, and our girl descends like this:

itk::Archetype <- iwidgets::Labeledframe

so itk::Archetype is the parent, iwidgets::Labeledframe is the child. generational slay. πŸ‘‘


⭐ STANDARD OPTIONS ⭐

these are the classic hand-me-downs everyone gets:

  • background
  • borderwidth
  • cursor
  • foreground
  • relief
if you want the full tea on these, go read the "options" manual entry. it's all documented there, no cap. πŸ“–

πŸ’œ WIDGET-SPECIFIC OPTIONS πŸ’œ

these are the ones that make labeledframe her. 🌈

  • Name: iPadX, Class: IPad, Command-Line Switch: -ipadx β€” this is the horizontal padding space sitting between the border and the childsite. the value can be any of the forms acceptable to Tk_GetPixels. the default is 0.
  • Name: iPadY, Class: IPad, Command-Line Switch: -ipady β€” same energy but vertical: the vertical padding space between the border and the childsite. value can be any form acceptable to Tk_GetPixels. the default is 0.
  • Name: labelBitmap, Class: Bitmap, Command-Line Switch: -labelbitmap β€” a bitmap to show in the label, in any of the forms acceptable to Tk_GetBitmap. heads up: this one overrides the labeltext option. πŸ’€
  • Name: labelImage, Class: Image, Command-Line Switch: -labelimage β€” an image to be used as the label. the image can be any of the values created by the image create command. this option overrides both the labelbitmap and labeltext options. main character energy fr. πŸ–ΌοΈ
  • Name: labelMargin, Class: Margin, Command-Line Switch: -labelmargin β€” the distance between the inner edge of the hull frame's relief and the label, in any of the forms acceptable to Tk_GetPixels. the default is 10 pixels.
  • Name: labelText, Class: Text, Command-Line Switch: -labeltext β€” the text of the label around the childsite. ✍️
  • Name: labelVariable, Class: Variable, Command-Line Switch: -labelvariable β€” the text variable of the label around the childsite. πŸ”„
  • Name: labelFont, Class: Font, Command-Line Switch: -labelfont β€” the font of the label around the childsite. cute typography moment. πŸŽ€
  • Name: labelPos, Class: Position, Command-Line Switch: -labelpos β€” where the label sits inside the grooved relief of the hull widget. your choices are: ne, n, nw, se, s, sw, en, e, es, wn, w, ws. the default is n. 🧭

🌈 DESCRIPTION 🌈

so what does iwidgets::labeledframe actually do? it creates a hull frame with a grooved relief, a label positioned within that grooved relief of the hull frame, and a frame childsite. the frame childsite can be filled with any widget, either via a derived class or through the use of the childsite method. 🫢

this class was designed to be a general purpose base class for supporting the combination of a labeled frame and a childsite. the options include the ability to position the label at configurable locations within the grooved relief of the hull frame, and to control the display of the label. literally so flexible it's iconic. ✨


πŸ’… METHODS πŸ’…

the iwidgets::labeledframe command creates a new Tcl command whose name is pathName. this command may be used to invoke various operations on the widget. it has the following general form:

pathName option ?arg arg ...?

option and the args determine the exact behavior of the command. the following commands are possible for labeledframe widgets:


πŸŽ€ WIDGET-SPECIFIC METHODS πŸŽ€

  • pathName childsite β€” return the path name of the child site. that's where your lil widgets go live. 🏠
  • pathName cget option β€” returns the current value of the configuration option given by option. option may have any of the values accepted by the iwidgets::labeledframe command. πŸ‘€
  • pathName configure ?option? ?value option value ...? β€” query or modify the configuration options of the widget. if no option is specified, it returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). if option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). if one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. option may have any of the values accepted by the iwidgets::labeledframe command. πŸ› οΈ

🧚 COMPONENTS 🧚

  • Name: label, Class: label β€” the label component provides the label for the labeled widget. see the "label" widget manual entry for details on the label component item. πŸ“š

πŸ”₯ EXAMPLE πŸ”₯

the labeledframe was primarily meant to be a base class. the Radiobox is a good example of a derived class of the labeledframe class. in order to provide equal support for composite classes, the 'childsite' method also exists. the following is an example of 'childsite' method usage. πŸ’«

        package require Iwidgets 4.0
        iwidgets::labeledframe .lw -labeltext "Entry Frame" -labelpos n
        pack .lw -fill both -expand yes -padx 10 -pady 10
        set cs [.lw childsite]

        pack [iwidgets::entryfield $cs.entry1 -labeltext "Name:"] -side top
       -fill x
        pack [iwidgets::spinint $cs.entry2 -labeltext "Number:"] -side top
       -fill x
        pack [iwidgets::pushbutton $cs.entry3 -text "Details:"] -side top -fill
       x

πŸ’– AUTHOR πŸ’–

John A. Tucker β€” thank you for this gift, king. πŸ™‡β€β™€οΈ


🌟 KEYWORDS 🌟

labeledframe, widget


okay that's the whole page bestie, we ate and left no crumbs. this one came to you from the Tk manual, filed under iwidgets::labeledframe(1) β€” go forth and frame things, labeled-ly. πŸ¦‹βœ¨πŸ’…

πŸ“¦ where this page comes from