tixNoteBook(n)
π tixNoteBook(n) β the notebook widget, explained by your favorite Unix bestie
okay so this is the manual page for tixNoteBook, straight out of the Tix Built-In Commands crew. grab a boba, we're building tabbed pages π
β¨ NAME β¨
tixNoteBook β create and manipulate tixNoteBook widgets. that's it, that's the vibe π
β¨ SYNOPSIS β¨
tixNoteBook pathName ?options?
literally just hand it a path name and some options and boom, notebook. β¨
β¨ STANDARD OPTIONS β¨
bestie, the NoteBook widget supports all the standard options of a frame widget. like, all of them. go check out the options(n) manual entry if you want the details on those. iykyk π«Ά
β¨ WIDGET-SPECIFIC OPTIONS β¨
these are the ones that are, like, extra extra π
-dynamicgeometry dynamicGeometryβ if you set this tofalse, the Notebook sizes itself to fit the largest page. if you set it totrue, it sizes itself to fit the current page instead (so yeah, the size can change when the user flips between pages). the default value isfalse. ngl, a setting oftrueis discouraged β so like, don't π-ipadx ipadXβ how much internal horizontal padding goes around the sides of the page subwidgets.-ipady ipadYβ how much internal vertical padding goes around the sides of the page subwidgets.
β¨ SUBWIDGETS β¨
πΈ nbframe β class tixNoteBookFrame
this is the "note book frame" widget that displays the tabs of the notebook. most of the display options for the page tabs are controlled by this subwidget. like β say you want a different font for the tab names of the pages, or you want to change the color of the inactive tabs, or the color behind the tabs? yeah, you configure the options of the nbframe subwidget, bestie. see the manual page of tixNoteBookFrame(n) for more details. slay π¦
πΈ the page subwidgets
on top of that, all the page subwidgets created as a result of the add command can be accessed by the subwidget command. they're identified by the pageName parameter you pass to the add command. cute, right? π
β¨ DESCRIPTION β¨
the tixNoteBook command creates a new window (given by the pathName argument) and makes it into a NoteBook widget. additional options, described above, may be specified on the command line or in the option database to configure aspects of the NoteBook widget such as its cursor and relief. π«
so the NoteBook widget can be used to display many windows in a limited space, using a "notebook" metaphor. the notebook is divided into a stack of pages (windows). at any one time only one of these pages can be shown. the user navigates through these pages by choosing the visual "tabs" at the top of the NoteBook widget. it's giving physical notebook but make it Tcl. obsessed π
β¨ WIDGET COMMANDS β¨
the tixNoteBook command creates a new Tcl command whose name is the same as the path name of the NoteBook widget's window. you can use this command to invoke various operations on the widget. general form goes like this:
pathName option ?arg arg ...?
PathName is the name of the command, which is the same as the NoteBook widget's path name. Option and the args determine the exact behavior of the command. here's everything a NoteBook widget can do π
π pathName add pageName ?option value ...?
adds a new notebook page subwidget into the NoteBook widget. you can supply additional parameters to configure this page subwidget. possible options are:
-anchorβ specifies how the information in a tab (e.g. text or a bitmap) is to be displayed in the widget. must be one of the valuesn,ne,e,se,s,sw,w,nw, orcenter. for example,nwmeans display the information such that its top-left corner is at the top-left corner of the widget.-bitmapβ specifies a bitmap to display on the tab of this page. the bitmap is displayed only if none of the-labelor-imageoptions are specified.-createcmdβ specifies a TCL command to be called the first time a page is shown on the screen. you can use this option to delay the creation of the contents of a page until it's necessary. so it can be used to speed up the interface creation process, especially when there are a large number of pages in a NoteBook widget. lowkey a performance hack, love that for us π₯-imageβ specifies an image to display on the tab of this page. the image is displayed only if the-labeloption is not specified.-justifyβ when there are multiple lines of text displayed in a tab, this option determines how the lines line up with each other. must be one ofleft,center, orright.leftmeans the lines' left edges all line up,centermeans the lines' centers are aligned, andrightmeans the lines' right edges line up.-labelβ specifies a text label string to display on the tab of this page subwidget.-raisecmdβ specifies a TCL command to be called whenever this page is raised by the user.-stateβ specifies whether this page can be raised by the user. must be eithernormalordisabled.-underlineβ specifies the integer index of a character to underline in the tab. this option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries.0corresponds to the first character of the text displayed in the widget,1to the next character, and so on.-wraplengthβ this option specifies the maximum line length of the label string on this tab. if the line length of the label string exceeds this length, it gets wrapped onto the next line, so that no line is longer than the specified length. the value may be specified in any of the standard forms for screen distances. if this value is less than or equal to0then no wrapping is done: lines will break only at newline characters in the text.
π pathName cget option
returns the current value of the configuration option given by option. Option may have any of the values accepted by the tixNoteBook 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 the available options for pathName (see Tk_ConfigureInfo for info 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 tixNoteBook command. iconic behavior β¨
π pathName delete pageName?
deletes the page identified by pageName. bye bestie π
π pathName pagecget pageName option
returns the current value of the configuration option given by option in the page given by pageName. Option may have any of the values accepted by the add widget command.
π pathName pageconfigure pageName ?option? ?value ...?
when no option is given, prints out the values of all options of this page. if option is specified with no value, then the command returns the current value of that option. if one or more option-value pairs are specified, then the command modifies the given page's option(s) to have the given value(s); in this case the command returns an empty string. Option may be any of the options accepted by the add widget command. π
π pathName pages
returns a list of the names of all the pages. a little roster of your pages, adorable πΈ
π pathName raise pageName
raise the page identified by pageName. main character energy, honestly π
π pathName raised
returns the name of the currently raised page. the one on top, the moment-haver, the chosen one β
π pathName subwidget name ?args?
when no options are given, this command returns the pathname of the subwidget of the specified name.
when options are given, the widget command of the specified subwidget will be called with these options. so you can just... reach straight in there. love that for you π
β¨ BINDINGS β¨
- when the user presses the left mouse button over a notebook tab, the notebook page associated with that tab will be raised to the top of the stack of pages. click and slay π±οΈ
- the pages can also be selected using the keyboard. the user can type the Tab key to cycle among the set of pages. when the focus appears on the desired page, the user can type Return or space to select that page. or, if the user wants to cancel the selection, he/she can type the Escape key. keyboard girlies stay winning β¨οΈ
β¨ KEYWORDS β¨
Tix(n) β that's the keyword, that's the whole list, no cap π¦
π and that's the whole page bestie β every flag, every command, every binding, nothing skipped, nothing invented. go build something cute with it.
πΈ version 4.0, Tix, and it's the tixNoteBook(n) page β mwah, love you, bye! π
β¨π
π¦ where this page comes from
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: tix 8.4.3-160000.2.2 Β· BSD-3-Clause
- Copyright (c) 1993-1999 Ioi Kim Lam
- Copyright (c) 2000-2001 Tix Project Group
- (c) 1990 The Regents of the University of California
- (c) 1994-1995 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms