📄 gtkfilechooserbutton.html
字号:
<tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> an integer width (in characters) that the button will use to size itself.</td></tr></tbody></table></div><p class="since">Since 2.6</p></div><hr><div class="refsect2" lang="en"><a name="id4034556"></a><h3><a name="gtk-file-chooser-button-set-width-chars"></a>gtk_file_chooser_button_set_width_chars ()</h3><a class="indexterm" name="id4034572"></a><pre class="programlisting">void gtk_file_chooser_button_set_width_chars (<a class="link" href="GtkFileChooserButton.html" title="GtkFileChooserButton">GtkFileChooserButton</a> *button, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> n_chars);</pre><p>Sets the width (in characters) that <em class="parameter"><code>button</code></em> will use to <em class="parameter"><code>n_chars</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td><td> the button widget to examine.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>n_chars</code></em> :</span></p></td><td> the new width, in characters.</td></tr></tbody></table></div><p class="since">Since 2.6</p></div><hr><div class="refsect2" lang="en"><a name="id4034666"></a><h3><a name="gtk-file-chooser-button-get-focus-on-click"></a>gtk_file_chooser_button_get_focus_on_click ()</h3><a class="indexterm" name="id4034682"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gtk_file_chooser_button_get_focus_on_click (<a class="link" href="GtkFileChooserButton.html" title="GtkFileChooserButton">GtkFileChooserButton</a> *button);</pre><p>Returns whether the button grabs focus when it is clicked with the mouse.See <a class="link" href="GtkFileChooserButton.html#gtk-file-chooser-button-set-focus-on-click"><code class="function">gtk_file_chooser_button_set_focus_on_click()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td><td> a <a class="link" href="GtkFileChooserButton.html" title="GtkFileChooserButton"><span class="type">GtkFileChooserButton</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the button grabs focus when it is clicked with the mouse.</td></tr></tbody></table></div><p class="since">Since 2.10</p></div><hr><div class="refsect2" lang="en"><a name="id4034784"></a><h3><a name="gtk-file-chooser-button-set-focus-on-click"></a>gtk_file_chooser_button_set_focus_on_click ()</h3><a class="indexterm" name="id4034801"></a><pre class="programlisting">void gtk_file_chooser_button_set_focus_on_click (<a class="link" href="GtkFileChooserButton.html" title="GtkFileChooserButton">GtkFileChooserButton</a> *button, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> focus_on_click);</pre><p>Sets whether the button will grab focus when it is clicked with the mouse.Making mouse clicks not grab focus is useful in places like toolbars whereyou don't want the keyboard focus removed from the main area of theapplication.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td><td> a <a class="link" href="GtkFileChooserButton.html" title="GtkFileChooserButton"><span class="type">GtkFileChooserButton</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>focus_on_click</code></em> :</span></p></td><td> whether the button grabs focus when clicked with the mouse</td></tr></tbody></table></div><p class="since">Since 2.10</p></div></div><div class="refsect1" lang="en"><a name="id4034895"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id4034906"></a><h3><a name="GtkFileChooserButton--dialog"></a>The <code class="literal">"dialog"</code> property</h3><a class="indexterm" name="id4034922"></a><pre class="programlisting"> "dialog" <a class="link" href="GtkFileChooser.html" title="GtkFileChooser">GtkFileChooser</a> : Write / Construct Only</pre><p>Instance of the <a class="link" href="GtkFileChooserDialog.html" title="GtkFileChooserDialog"><span class="type">GtkFileChooserDialog</span></a> associated with the button.</p><p></p><p>Since 2.6</p></div><hr><div class="refsect2" lang="en"><a name="id4034964"></a><h3><a name="GtkFileChooserButton--focus-on-click"></a>The <code class="literal">"focus-on-click"</code> property</h3><a class="indexterm" name="id4034982"></a><pre class="programlisting"> "focus-on-click" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write</pre><p>Whether the <a class="link" href="GtkFileChooserButton.html" title="GtkFileChooserButton"><span class="type">GtkFileChooserButton</span></a> button grabs focus when it is clickedwith the mouse.</p><p></p><p>Default value: TRUE</p><p>Since 2.10</p></div><hr><div class="refsect2" lang="en"><a name="id4035028"></a><h3><a name="GtkFileChooserButton--title"></a>The <code class="literal">"title"</code> property</h3><a class="indexterm" name="id4035043"></a><pre class="programlisting"> "title" <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a> : Read / Write</pre><p>Title to put on the <a class="link" href="GtkFileChooserDialog.html" title="GtkFileChooserDialog"><span class="type">GtkFileChooserDialog</span></a> associated with the button.</p><p></p><p>Default value: "Select A File"</p><p>Since 2.6</p></div><hr><div class="refsect2" lang="en"><a name="id4035089"></a><h3><a name="GtkFileChooserButton--width-chars"></a>The <code class="literal">"width-chars"</code> property</h3><a class="indexterm" name="id4035106"></a><pre class="programlisting"> "width-chars" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> : Read / Write</pre><p>The width of the entry and label inside the button, in characters.</p><p></p><p>Allowed values: >= -1</p><p>Default value: -1</p><p>Since 2.6</p></div></div><div class="refsect1" lang="en"><a name="id4035146"></a><h2>Signal Details</h2><div class="refsect2" lang="en"><a name="id4035157"></a><h3><a name="GtkFileChooserButton-file-set"></a>The <code class="literal">"file-set"</code> signal</h3><a class="indexterm" name="id4035174"></a><pre class="programlisting">void user_function (<a class="link" href="GtkFileChooserButton.html" title="GtkFileChooserButton">GtkFileChooserButton</a> *filechooserbutton, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data) : Run First / Action</pre><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>filechooserbutton</code></em> :</span></p></td><td>the object which received the signal.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id4035245"></a><h2>See Also</h2><p><a class="link" href="GtkFileChooserDialog.html" title="GtkFileChooserDialog"><span class="type">GtkFileChooserDialog</span></a></p></div><div class="refsect1" lang="en"><a name="id4035263"></a><div class="refsect2" lang="en"><a name="id4035264"></a></div><hr><div class="refsect2" lang="en"><a name="id4035265"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -