IWIDGETS_FILESELECTIONDIALOG(3iwidget)
π iwidgets::fileselectiondialog β the manual page, but make it cute π
okay bestie, welcome to the incr Widgets section of the manual, page iwidgets::fileselectiondialog(1). buckle up, this one's a whole file-picking situation and she is iconic β¨
β¨ NAME β¨
iwidgets::fileselectiondialog β bestie, this makes a whole file selection dialog widget. it's giving "let the user pick a file, but make it a popup." π
πΈ SYNOPSIS πΈ
iwidgets::fileselectiondialog pathName ?options?
π¦ INHERITANCE π¦
the family tree, and yes she comes from very good stock:
itk::Toplevel <- iwidgets::Shell <- iwidgets::Dialogshell <-
iwidgets::Dialog <- iwidgets::Fileselectiondialog
β STANDARD OPTIONS β
these are the classics, the OGs, the ones everybody gets:
activeBackground background borderWidth cursor
foreground highlightColor highlightThickness insertBackground
insertBorderWidth insertOffTime insertOnTime insertWidth
selectBackground selectBorderWidth selectForeground
fr fr, go read the "options" manual entry if you want the deets on all of the standard options. i'm not gatekeeping, i'm just pointing you at the source π
π ASSOCIATED OPTIONS π
these ones come from her friends. it takes a village, no cap:
textBackground textFont
check the "entryfield" widget manual entry for the tea on those two above π
childSitePos directory dirsLabel dirSearchCommand
dirsOn filesLabel filesLabelOn fileSearchCommand
filesOn fileType filterLabel filterOn
invalid mask noMatchString selectionLabel
selectionOn
that whole stack belongs to the "fileselectionbox" widget manual entry, she's the one who brought them to the party π
labelFont
this one's from the "labeledwidget" widget manual entry, look there for details π
textBackground textFont
and yeah, textBackground and textFont show up again over here β this time they're from the "scrolledlistbox" widget manual entry. yes bestie, they get around, and honestly? slay.
activeRelief elementBorderWidth jumptroughColor
these three are from the "scrollbar" widget class manual entry. scrollbar said "i also have lore." π₯
π INHERITED OPTIONS π
options she got from her ancestors, periodt:
buttonBoxPadX buttonBoxPadY buttonBoxPos padX
padY separator thickness
all of the above come from the "dialogshell" widget manual entry π
height master modality width
these are from the "shell" widget manual entry πΈ
title
and title is from the "Toplevel" widget manual entry. she got it from the top, literally π
π DESCRIPTION π
so here's the vibe: the iwidgets::fileselectiondialog command creates a file selection dialog that's similar to the OSF/Motif standard composite widget. main character behavior, honestly.
she's derived from the Dialog class, and she's composed of a FileSelectionBox with attributes set to manipulate the dialog buttons. so like, the box is the moment, the dialog is the ~aura~ β¨
π«Ά METHODS π«Ά
the iwidgets::fileselectiondialog command creates a brand new Tcl command whose name is pathName. you use it to invoke various operations on the widget. general form, bestie:
pathName option ?arg arg ...?
option and the args decide the exact behavior of the command. and here's what's possible for fileselectiondialog widgets π
π ASSOCIATED METHODS π
get childsite filter
check the "fileselectionbox" class manual entry for details on these associated methods, k? π
π INHERITED METHODS π
add buttonconfigure defaulthide
insert invoke show
these come from the "buttonbox" widget manual entry π
activate center deactivate
and these come from the "shell" widget manual entry. shell really said "here, take my methods, bestie" π
π WIDGET-SPECIFIC METHODS π
the ones that are hers. her own signature moves:
pathName cget optionβ returns the current value of the configuration option given by option. option may have any of the values accepted by theiwidgets::fileselectiondialogcommand. it's the "hey what's ur setting rn" move π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 forpathName(peepTk_ConfigureInfofor 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 β and that list will be identical to the corresponding sublist of the value returned when 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 that case the command returns an empty string. option may have any of the values accepted by theiwidgets::fileselectiondialogcommand. she's flexible like that π
π§ COMPONENTS π§
Name: fsb Class: Fileselectionbox
the fsb component is the file selection box for the file selection dialog. go read the "fileselectionbox" widget manual entry for the deets on the fsb component item, bestie π
π EXAMPLE π
here's how you actually do it, copy-paste ready, no notes:
package require Iwidgets 4.0
#
# Non-modal example
#
proc okCallback {} {
puts "You selected [.nmfsd get]"
.nmfsd deactivate
}
iwidgets::fileselectiondialog .nmfsd -title Non-Modal
.nmfsd buttonconfigure OK -command okCallback
.nmfsd activate
#
# Modal example
#
iwidgets::fileselectiondialog .mfsd -modality application
.mfsd center
if {[.mfsd activate]} {
puts "You selected [.mfsd get]"
} else {
puts "You cancelled the dialog"
}
two whole examples?? we ate. π₯
π AUTHOR π
Mark L. Ulferts β the legend, the icon, the blueprint π
π₯ KEYWORDS π₯
fileselectiondialog, fileselectionbox, dialog, dialogshell, shell, widget
and that's the whole page bestie!! π this came to you from the Tk corner of the world, filed under iwidgets::fileselectiondialog(1). go pick some files, you've got this πβ¨π¦
π¦ where this page comes from
- debian bookworm: iwidgets4-doc 4.1.1-2.1
- debian trixie: iwidgets4-doc 4.1.1-4
- ubuntu jammy: iwidgets4-doc 4.1.1-2.1
- ubuntu noble: iwidgets4-doc 4.1.1-2.1
- ubuntu resolute: iwidgets4-doc 4.1.1-4
- ubuntu stonking: iwidgets4-doc 4.1.1-4
- Copyright (c) 1995 DSC Technologies Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms