tixFileSelectBox(n)

πŸ“¦ version 8.4.3, in opensuse-leap 16.0

πŸ’… tixFileSelectBox β€” from the Tix Built-In Commands manual, bestie πŸŽ€

Okay so picture this: it's giving file-picker, but make it Tix. This is the manual page for tixFileSelectBox(n), and I'm gonna walk you through every single thing on it, no cap. ✨


🌸 NAME 🌸

tixFileSelectBox β€” create and manipulate Tix FileSelectBox widgets. That's the whole vibe. πŸ¦‹


✨ SYNOPSIS ✨

tixFileSelectBox pathName ?options?

Literally that's it. Give it a pathName, sprinkle some ?options? on top, and you've got yourself a widget. πŸ’–


⭐ STANDARD OPTIONS ⭐

Real talk: the FileSelectBox widget supports all the standard options of a frame widget. All of them. Head over to the options(n) manual entry if you want the full tea on what those standard options actually are. 🫢


πŸŽ€ WIDGET-SPECIFIC OPTIONS πŸŽ€

These are the options that are, like, hers. 🌈

  • -browsecmd browsecmd β€” tells the widget which command to run when the user browses through the files. Default mood: if -browsecmd is specified, that browse command fires when the user clicks on a filename in the Files listbox. πŸ‘†
  • -command command β€” the command to execute when the FileSelectBox is invoked. It gets called with exactly one parameter: the filename the user selected. Iconic. 🎯

And then this one gets the full character sheet treatment:

  • Name: directory
  • Class: Directory
  • Switch: -directory
  • Alias: -dir

Says which directory to look for files in. By default it's the current working directory of the program, and it changes as the user browses through directories. It's giving "main character energy, but make it a path". πŸ’€

  • -disablecallback disableCallback β€” a boolean value that says whether callbacks should be disabled. Set it to true and the TCL command from -command will not be executed when the -value of the ExFileSelectBox widget changes. Yes, that's exactly what it says. πŸ™ˆ
  • -pattern pattern β€” sets the matching pattern for which file names get listed in the Files listbox. Example: "*.c" matches every filename ending in ".c". If you set this option to the empty string, the default pattern "*" gets used instead. Slay. πŸ“

Another full character sheet:

  • Name: value
  • Class: Value
  • Switch: -value
  • Alias: -selection

Specifies the filename the user currently has selected. That's her whole job. πŸ‘‘


πŸ¦‹ SUBWIDGETS πŸ¦‹

The FileSelectBox has a whole little friend group of subwidgets, and here's the roll call:

  • Name: dirlist
  • Class: TixScrolledListBox

The scrolled listbox that shows the directories. πŸ“

  • Name: filelist
  • Class: TixScrolledListBox

The scrolled listbox that shows the files. πŸ“„

  • Name: filter
  • Class: TixComboBox

The ComboBox listbox that shows the filter string. πŸ”

  • Name: selection
  • Class: TixComboBox

The ComboBox listbox that shows the file selection. βœ…


πŸ’œ DESCRIPTION πŸ’œ

The tixFileSelectBox command creates a new window (the one you passed as pathName) and turns it into a FileSelectBox widget. Extra options β€” the ones listed above β€” can be specified on the command line or in the option database to configure aspects of the FileSelectBox like its cursor and relief. Fancy. πŸ’…

The FileSelectBox is similar to the standard Motif(TM) file-selection box. It's generally used for the user to choose a file. FileSelectBox stores the files most recently selected into a ComboBox widget so they can be quickly selected again β€” it remembers, and honestly? Obsessed. The tixFileSelectDialog widget is a combination of the FileSelectBox widget and a dialog widget. ✨


πŸ”₯ WIDGET COMMAND πŸ”₯

The tixFileSelectBox command creates a new Tcl command whose name is the same as the path name of the FileSelectBox's window. You use this command to invoke various operations on the widget. General form goes a little something like this:

pathName option ?arg arg ...?

PathName is the name of the command, which is the same as the FileSelectBox widget's path name. option and the args determine the exact behavior of the command. These are the commands FileSelectBox widgets support:

  • pathName cget option β€” returns the current value of the configuration option given by option. option may have any of the values accepted by the tixFileSelectBox 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, the command returns a list describing that one named option β€” this list will be identical to the corresponding sublist of the value you'd get with no option specified. If one or more option-value pairs are given, the command modifies the given widget option(s) to have the given value(s), and in that case the command returns an empty string. option may have any of the values accepted by the tixFileSelectBox command.
  • pathName filter β€” updates the files listed in the FileSelectBox according to the filtering pattern specified in the filter subwidget. πŸ”
  • pathName invoke β€” executes the command specified by the -command option, with the filename stored in the selection subwidget. πŸš€
  • pathName subwidget name ?args? β€” when no options are given, this command returns the pathname of the subwidget with the specified name. When options are given, the widget command of that subwidget gets called with those options. iykyk 🫢

🌈 DEFAULT BINDINGS 🌈

TIX automatically creates class bindings for FileSelectBoxes, and they give them the following default behavior. Count 'em:

  1. Mouse button 1 in the Directory listbox will change the filter string to the selected directory. πŸ–±οΈ
  2. Mouse button 1 in the Files listbox will change the filename that appears in the Selection entry. It will also trigger the -browsecmd if that option has been specified. πŸ‘€
  3. The current directory will be changed by (1) double clicking the Directory listbox or (2) invoking the Filter ComboBox. Please refer to the man page of tixComboBox for the default bindings of the ComboBoxes and how they can be invoked. πŸ“š
  4. The command specified by the option -command will be invoked by (1) double clicking the Files listbox or (2) invoking Selection ComboBox. 🎬
Heads up bestie: those ComboBox bindings live in the tixComboBox man page, not here β€” go read that one for the full lore. πŸ’–

🧚 KEYWORDS 🧚

tixFileSelectBox, tixComboBox, tixFileSelectDialog, Tix(n), 🌟


Okay that's the whole page, every flag and every binding intact, periodt. πŸ’… This was tixFileSelectBox(n) from Tix 4.0 β€” yeah, version 4.0, that's the one β€” so mwah, go build something cute with it. πŸŽ€πŸ«Άβœ¨

πŸ“¦ where this page comes from