How to set a default adjustment in glade widget

Chris Morley <[email protected]> Fri, 21 Aug 2015 06:38:08 +0000
Newsgroups gmane.comp.gnome.glade.user
Message-ID <[email protected]>
--===============0609906420==
Content-Type: multipart/alternative;
	boundary="_08b6fc1d-c5c7-47d2-a221-6208d358d003_"

--_08b6fc1d-c5c7-47d2-a221-6208d358d003_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have built a custom widget based on Hscale (GTK2).
In my widget I supply an adjustment.
This works fine if I use the widget directly in Python code.
If I use it as a Glade widget=2C the adjustment seems to be
ignored. Is there a way to:
a) tell Glade not to add an adjustment of it's own=2C So that
mine is used automatically.
Or
b) tell Glade to use my adjustment directly.

I had tried something like:

<glade-widget-class name=3D"Override" generic-name=3D"override" title=3D"Ov=
erride Controls">
            <properties>
                <property id=3D"adjustment" default=3D"adjustment" visible=
=3D"True"/>
            </properties>
        </glade-widget-class>
and
        <property id=3D"adjustment"  disabled=3D"True" visible=3D"False"/>

Neither did what I was hoping.

I can paste widget code if required.

Thanks=20
Chris Morley
 		 	   		  =

--_08b6fc1d-c5c7-47d2-a221-6208d358d003_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 12pt=3B
font-family:Calibri
}
--></style></head>
<body class=3D'hmmessage'><div dir=3D'ltr'>I have built a custom widget bas=
ed on Hscale (GTK2).<br>In my widget I supply an adjustment.<br>This works =
fine if I use the widget directly in Python code.<br>If I use it as a Glade=
 widget=2C the adjustment seems to be<br>ignored. Is there a way to:<br>a) =
tell Glade not to add an adjustment of it's own=2C So that<br>mine is used =
automatically.<br>Or<br>b) tell Glade to use my adjustment directly.<br><br=
>I had tried something like:<br><br>&lt=3Bglade-widget-class name=3D"Overri=
de" generic-name=3D"override" title=3D"Override Controls"&gt=3B<br>&nbsp=3B=
&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nb=
sp=3B &lt=3Bproperties&gt=3B<br>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nb=
sp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=
=3B &lt=3Bproperty id=3D"adjustment" default=3D"adjustment" visible=3D"True=
"/&gt=3B<br>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=
=3B&nbsp=3B&nbsp=3B&nbsp=3B &lt=3B/properties&gt=3B<br>&nbsp=3B&nbsp=3B&nbs=
p=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B &lt=3B/glade-widget-class&gt=3B<br>and=
<br>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B &lt=3Bproperty=
 id=3D"adjustment"&nbsp=3B <span class=3D"term">disabled=3D"True" </span>vi=
sible=3D"False"/&gt=3B<br><br>Neither did what I was hoping.<br><br>I can p=
aste widget code if required.<br><br>Thanks <br>Chris Morley<br> 		 	   		 =
 </div></body>
</html>=

--_08b6fc1d-c5c7-47d2-a221-6208d358d003_--

--===============0609906420==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Glade-users maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/glade-users

--===============0609906420==--