<?xml version="1.0"?>
<page id="GimpUi.ScaleEntry.set_bounds"
      type="topic"
      style="method"
      xmlns="http://projectmallard.org/1.0/"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/1.0/ui/">
  <info>
    <link xref="GimpUi.ScaleEntry" group="method" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>none</api:type>
      </api:returns>
      <api:name>gimp_scale_entry_set_bounds</api:name>
      <api:arg>
        <api:type>GimpUi.ScaleEntry</api:type>
        <api:name>self</api:name>
      </api:arg>
      <api:arg>
        <api:type>float</api:type>
        <api:name>lower</api:name>
      </api:arg>
      <api:arg>
        <api:type>float</api:type>
        <api:name>upper</api:name>
      </api:arg>
      <api:arg>
        <api:type>bool</api:type>
        <api:name>limit_scale</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>GimpUi.ScaleEntry.set_bounds</title>
  <synopsis><code mime="text/x-python">
@accepts(GimpUi.ScaleEntry, float, float, bool)
@returns(none)
def set_bounds(self, lower, upper, limit_scale):
    # Python wrapper for gimp_scale_entry_set_bounds()
  </code></synopsis>
  <p>By default the <link href="../Gtk-3.0/Gtk.SpinButton.html">Gtk.SpinButton</link> and <link href="../Gtk-3.0/Gtk.Scale.html">Gtk.Scale</link> will have the same range.
In some case, you want to set a different range. In particular when
the finale range is huge, the <link href="../Gtk-3.0/Gtk.Scale.html">Gtk.Scale</link> might become nearly useless
as every tiny slider move would dramatically update the value. In
this case, it is common to set the <link href="../Gtk-3.0/Gtk.Scale.html">Gtk.Scale</link> to a smaller common
range, while the <link href="../Gtk-3.0/Gtk.SpinButton.html">Gtk.SpinButton</link> would allow for the full allowed
range.
This function allows this. Obviously the <link href="../Gtk-3.0/Gtk.Adjustment.html">Gtk.Adjustment</link> of both
widgets would be synced but if the set value is out of the <link href="../Gtk-3.0/Gtk.Scale.html">Gtk.Scale</link>
range, the slider would simply show at one extreme.</p>  <p>If <code>limit_scale</code> is <code>False</code> though, it would sync back both widgets
range to the new values.</p>  <p>Note that the step and page increments are updated when the range is
updated according to some common usage algorithm which should work if
you don't have very specific needs. If you want to customize the step
increments yourself, you may call <link xref="GimpUi.LabelSpin.set_increments"/></p>

<terms>
<item>
<title><code>self</code></title>
  <p>The #GtkScaleEntry.</p>
</item>
<item>
<title><code>lower</code></title>
  <p>the lower value for the whole widget if <code>limit_scale</code> is
              <code>False</code>, or only for the <link href="../Gtk-3.0/Gtk.Scale.html">Gtk.Scale</link> if <code>True</code>.</p>
</item>
<item>
<title><code>upper</code></title>
  <p>the upper value for the whole widget if <code>limit_scale</code> is
              <code>False</code>, or only for the <link href="../Gtk-3.0/Gtk.SpinButton.html">Gtk.SpinButton</link> if <code>True</code>.</p>
</item>
<item>
<title><code>limit_scale</code></title>
  <p>Whether the range should only apply to the <link href="../Gtk-3.0/Gtk.Scale.html">Gtk.Scale</link> or
              if it should share its #GtkAdjustement with the
              <link href="../Gtk-3.0/Gtk.SpinButton.html">Gtk.SpinButton</link>. If <code>True</code>, both <code>lower</code> and <code>upper</code> must be
              included in current <link href="../Gtk-3.0/Gtk.SpinButton.html">Gtk.SpinButton</link> range.</p>
</item>
</terms>

</page>
