]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml
Use a GtkComboBox in SELECT_FOLDER mode (#157726).
[~andy/gtk] / docs / reference / gtk / tmpl / gtkfilechooserbutton.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkFileChooserButton
3
4 <!-- ##### SECTION Short_Description ##### -->
5 A button to launch a file selection dialog
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 The #GtkFileChooserButton is a widget that lets the user select a
10 file.  It implements the #GtkFileChooser interface.  Visually, it is a
11 file name with a button to bring up a #GtkFileChooserDialog.
12 The user can then use that dialog to change the file associated with
13 that button.  This widget does not support setting the "select-multiple"
14 property to %TRUE.
15 </para>
16
17 <example>
18 <title>Create a button to let the user select a file in /etc</title>
19 <programlisting>
20 {
21   GtkWidget *button;
22
23   button = gtk_file_chooser_button_new (_("Select a file"));
24   gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button),
25                                        "/etc");
26 }
27 </programlisting>
28 </example>
29
30 <para>
31 The #GtkFileChooserButton supports the #GtkFileChooserAction<!--
32 -->s %GTK_FILE_CHOOSER_ACTION_OPEN and %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER.
33 </para>
34
35 <important>
36 <para>
37 The #GtkFileChooserButton will ellipsize the label,
38 and thus will thus request little horizontal space.  To give the button
39 more space, you should call gtk_widget_size_request(),
40 gtk_file_chooser_button_set_width_chars(), or pack the button in
41 such a way that other interface elements give space to the widget.
42 </para>
43 </important>
44
45 <!-- ##### SECTION See_Also ##### -->
46 <para>
47 #GtkFileChooserDialog
48 </para>
49
50 <!-- ##### STRUCT GtkFileChooserButton ##### -->
51 <para>
52 This should not be accessed directly.  Use the accessor functions below. 
53 </para>
54
55
56 <!-- ##### ARG GtkFileChooserButton:dialog ##### -->
57 <para>
58
59 </para>
60
61 <!-- ##### ARG GtkFileChooserButton:title ##### -->
62 <para>
63
64 </para>
65
66 <!-- ##### ARG GtkFileChooserButton:width-chars ##### -->
67 <para>
68
69 </para>
70
71 <!-- ##### FUNCTION gtk_file_chooser_button_new ##### -->
72 <para>
73
74 </para>
75
76 @title: 
77 @action: 
78 @Returns: 
79
80
81 <!-- ##### FUNCTION gtk_file_chooser_button_new_with_backend ##### -->
82 <para>
83
84 </para>
85
86 @title: 
87 @action: 
88 @backend: 
89 @Returns: 
90
91
92 <!-- ##### FUNCTION gtk_file_chooser_button_new_with_dialog ##### -->
93 <para>
94
95 </para>
96
97 @dialog: 
98 @Returns: 
99
100
101 <!-- ##### FUNCTION gtk_file_chooser_button_get_title ##### -->
102 <para>
103
104 </para>
105
106 @button: 
107 @Returns: 
108
109
110 <!-- ##### FUNCTION gtk_file_chooser_button_set_title ##### -->
111 <para>
112
113 </para>
114
115 @button: 
116 @title: 
117
118
119 <!-- ##### FUNCTION gtk_file_chooser_button_get_width_chars ##### -->
120 <para>
121
122 </para>
123
124 @button: 
125 @Returns: 
126
127
128 <!-- ##### FUNCTION gtk_file_chooser_button_set_width_chars ##### -->
129 <para>
130
131 </para>
132
133 @button: 
134 @n_chars: 
135
136