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 the iwidgets::fileselectiondialog command. 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 for pathName (peep 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 β€” 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 the iwidgets::fileselectiondialog command. 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