Adding a component to resource dynamically?

Alec Bennett <[email protected]> Thu, 27 Sep 2012 23:35:36 -0700
Newsgroups gmane.comp.python.pythoncard
Message-ID <CACB9+z1C=OfS=g_9Lmv7yQC-Bi=BwZibUwkmJCTewQCg=fdEwg@mail.gmail.com>
--===============0741933410523055395==
Content-Type: multipart/alternative; boundary=e89a8ff250207f2c8204cabd4307

--e89a8ff250207f2c8204cabd4307
Content-Type: text/plain; charset=ISO-8859-1

Hello very quiet Pythoncard email list!

I'm trying to add an ImageButton dynamically to a resource file, and can't
figure out how to do so.

Suppose the ImageButton looked like this:

{'type':'ImageButton',
    'name':'stop',
    'position':(10, 10),
    'border':'transparent',
    'command':u'stop',
    'file':'',
    'visible':False,
    },

And I refer to the components in this resource file like this:

self.childWindow.components.whateverButton.visible = False (etc.)

Any idea how I would add this ImageButton component, short of writing to
the actual resource file?

Thanks for any help.

--e89a8ff250207f2c8204cabd4307
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello very quiet Pythoncard email list!<div><br></div><div>I&#39;m trying t=
o add an ImageButton dynamically to a resource file, and can&#39;t figure o=
ut how to do so.</div><div><br></div><div>Suppose the ImageButton looked li=
ke this:</div>
<div><br></div><div><div>{&#39;type&#39;:&#39;ImageButton&#39;,=A0</div><di=
v>=A0 =A0 &#39;name&#39;:&#39;stop&#39;,=A0</div><div>=A0 =A0 &#39;position=
&#39;:(10, 10),=A0</div><div>=A0 =A0 &#39;border&#39;:&#39;transparent&#39;=
,=A0</div><div>=A0 =A0 &#39;command&#39;:u&#39;stop&#39;,=A0</div>
<div>=A0 =A0 &#39;file&#39;:&#39;&#39;,=A0</div><div>=A0 =A0 &#39;visible&#=
39;:False,=A0</div><div>=A0 =A0 },</div></div><div><br></div><div>And I ref=
er to the components in this resource file like this:</div><div><br></div><=
div>self.childWindow.components.whateverButton.visible =3D False (etc.)</di=
v>
<div><br></div><div>Any idea how I would add this ImageButton component, sh=
ort of writing to the actual resource file?</div><div><br></div><div>Thanks=
 for any help.</div><div><br></div><div><br></div><div><br></div><div><br>
</div><div><br></div>

--e89a8ff250207f2c8204cabd4307--


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

------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
--===============0741933410523055395==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Pythoncard-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pythoncard-users

--===============0741933410523055395==--