Re: is there a label attribute for objects?

Kadir Haldenbilen <khaldenbilen-/[email protected]> Fri, 23 Aug 2013 00:11:29 -0700 (PDT)
Newsgroups gmane.comp.python.visualpython.user
Message-ID <[email protected]>
--===============0465927445682426030==
Content-Type: multipart/alternative;
	boundary="1524547028-823284304-1377241889=:20454"

--1524547028-823284304-1377241889=:20454
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

You can define a new simple label function of your own, which is "attached"=
 to an object like the following example:=0A=0Afrom visual import *=0A=0Abb=
 =3D box()=0A=0Adef objLabel(object, **kwargs):=0A=A0=A0=A0 ll =3D label(po=
s=3Dobject.pos, **kwargs)=0A=A0=A0=A0 return ll=0A=0A=0Aol =3D objLabel(bb,=
 text=3D"Center of a Box")=0A=0ASo now instead of using VPython label funct=
ion, they can use objLabel function, with an object attached to it.=0A=0AKa=
dir=0A=0A=0A=0A=0A________________________________=0A From: Mark Janssen <d=
[email protected]>=0ATo: Paul Camp <[email protected]> =0ACc: vpuser=
s <visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> =0ASent: Friday, August 23, 20=
13 2:06 AM=0ASubject: Re: [Visualpython-users] is there a label attribute f=
or objects?=0A =0A=0AThat's an interesting idea.=A0 Most Labels *are* attac=
hed to objects.=0AIf an objects label attribute is None, display nothing.=
=0A=0AThe problem is that Label currently has it's *own* set of attributes,=
=0Aso one would have to make all Labels have the same characteristics=0A(wh=
ich might be acceptable and could be settable in the Frame or=0ADisplay obj=
ect).=0A=0AProbably is better than Python and the programmer handling all t=
hose=0Aseparate Label objects.=0A=0AMy $0.02...=0A=0AMark=0A=0A------------=
------------------------------------------------------------------=0AIntrod=
ucing Performance Central, a new site from SourceForge and =0AAppDynamics. =
Performance Central is your source for news, insights, =0Aanalysis and reso=
urces for efficient Application Performance Management. =0AVisit us today!=
=0Ahttp://pubads.g.doubleclick.net/gampad/clk?id=3D48897511&iu=3D/4140/ostg=
.clktrk=0A_______________________________________________=0AVisualpython-us=
ers mailing list=0AVisualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org=0Ahttps://lists=
.sourceforge.net/lists/listinfo/visualpython-users
--1524547028-823284304-1377241889=:20454
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<html><body><div style=3D"color:#000; background-color:#fff; font-family:ti=
mes new roman, new york, times, serif;font-size:12pt">You can define a new =
simple label function of your own, which is "attached" to an object like th=
e following example:<br><br>from visual import *<br><br>bb =3D box()<br><br=
>def objLabel(object, **kwargs):<br>&nbsp;&nbsp;&nbsp; ll =3D label(pos=3Do=
bject.pos, **kwargs)<br>&nbsp;&nbsp;&nbsp; return ll<br><br><br>ol =3D objL=
abel(bb, text=3D"Center of a Box")<br><br>So now instead of using VPython l=
abel function, they can use objLabel function, with an object attached to i=
t.<br><br>Kadir<br><div><span><br></span></div><div><br></div>  <div style=
=3D"font-family: times new roman, new york, times, serif; font-size: 12pt;"=
> <div style=3D"font-family: times new roman, new york, times, serif; font-=
size: 12pt;"> <div dir=3D"ltr"> <hr size=3D"1">  <font face=3D"Arial" size=
=3D"2"> <b><span style=3D"font-weight:bold;">From:</span></b> Mark Janssen
 &lt;[email protected]&gt;<br> <b><span style=3D"font-weight: bold;=
">To:</span></b> Paul Camp &lt;[email protected]&gt; <br><b><span style=3D"=
font-weight: bold;">Cc:</span></b> vpusers &lt;[email protected]=
rceforge.net&gt; <br> <b><span style=3D"font-weight: bold;">Sent:</span></b=
> Friday, August 23, 2013 2:06 AM<br> <b><span style=3D"font-weight: bold;"=
>Subject:</span></b> Re: [Visualpython-users] is there a label attribute fo=
r objects?<br> </font> </div> <div class=3D"y_msg_container"><br>That's an =
interesting idea.&nbsp; Most Labels *are* attached to objects.<br>If an obj=
ects label attribute is None, display nothing.<br><br>The problem is that L=
abel currently has it's *own* set of attributes,<br>so one would have to ma=
ke all Labels have the same characteristics<br>(which might be acceptable a=
nd could be settable in the Frame or<br>Display object).<br><br>Probably is=
 better than Python and the programmer handling all those<br>separate Label
 objects.<br><br>My $0.02...<br><br>Mark<br><br>---------------------------=
---------------------------------------------------<br>Introducing Performa=
nce Central, a new site from SourceForge and <br>AppDynamics. Performance C=
entral is your source for news, insights, <br>analysis and resources for ef=
ficient Application Performance Management. <br>Visit us today!<br><a href=
=3D"" target=3D"_blank">http://pubads.g.doubleclick.net/gampad/clk?id=3D488=
97511&amp;iu=3D/4140/ostg.clktrk</a><br>___________________________________=
____________<br>Visualpython-users mailing list<br><a href=3D"" ymailto=3D"=
mailto:Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org">[email protected]=
ourceforge.net</a><br><a href=3D"" target=3D"_blank">https://lists.sourcefo=
rge.net/lists/listinfo/visualpython-users</a><br><br><br></div> </div> </di=
v>  </div></body></html>
--1524547028-823284304-1377241889=:20454--


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

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
--===============0465927445682426030==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Visualpython-users mailing list
Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/visualpython-users

--===============0465927445682426030==--