Re: is there a label attribute for objects?
Paul Camp <[email protected]> Fri, 23 Aug 2013 12:32:03 -0400
| Newsgroups | gmane.comp.python.visualpython.user |
|---|---|
| Message-ID | <OFCDCB49A3.3E85A776-ON85257BD0.005ACD39-85257BD0.005AD32B@spelman.edu> |
This is a multipart message in MIME format.
--===============5103143317916127120==
Content-Type: multipart/alternative;
boundary="=_alternative 005AD32A85257BD0_="
This is a multipart message in MIME format.
--=_alternative 005AD32A85257BD0_=
Content-Type: text/plain; charset="US-ASCII"
Thanks! Bruce suggested the same solution. I'll try it out.
Dr. Paul J. Camp
Physics Department
Spelman College
Atlanta, GA 30314
404-270-5864
"The beauty of the cosmos derives not only from unity in variety
but also from variety in unity"
-- Umberto Eco
The Name of the Rose
From: Kadir Haldenbilen <khaldenbilen-/[email protected]>
To: Mark Janssen <[email protected]>, Paul Camp
<[email protected]>
Cc: vpusers <visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Date: 08/23/2013 03:11 AM
Subject: Re: [Visualpython-users] is there a label attribute for
objects?
You can define a new simple label function of your own, which is
"attached" to an object like the following example:
from visual import *
bb = box()
def objLabel(object, **kwargs):
ll = label(pos=object.pos, **kwargs)
return ll
ol = objLabel(bb, text="Center of a Box")
So now instead of using VPython label function, they can use objLabel
function, with an object attached to it.
Kadir
From: Mark Janssen <[email protected]>
To: Paul Camp <[email protected]>
Cc: vpusers <visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Sent: Friday, August 23, 2013 2:06 AM
Subject: Re: [Visualpython-users] is there a label attribute for objects?
That's an interesting idea. Most Labels *are* attached to objects.
If an objects label attribute is None, display nothing.
The problem is that Label currently has it's *own* set of attributes,
so one would have to make all Labels have the same characteristics
(which might be acceptable and could be settable in the Frame or
Display object).
Probably is better than Python and the programmer handling all those
separate Label objects.
My $0.02...
Mark
------------------------------------------------------------------------------
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
_______________________________________________
Visualpython-users mailing list
Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/visualpython-users
--=_alternative 005AD32A85257BD0_=
Content-Type: text/html; charset="US-ASCII"
<font size=2 face="sans-serif">Thanks! Bruce suggested the same solution.
I'll try it out.</font>
<br><font size=2 face="sans-serif"><br>
<br>
Dr. Paul J. Camp<br>
Physics Department<br>
Spelman College<br>
Atlanta, GA 30314<br>
404-270-5864<br>
<br>
"The beauty of the cosmos derives not only from unity in variety<br>
but also from variety in unity"<br>
-- Umberto Eco<br>
The Name of the Rose</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Kadir Haldenbilen <khaldenbilen-/[email protected]></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">Mark Janssen <[email protected]>,
Paul Camp <[email protected]></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Cc:
</font><font size=1 face="sans-serif">vpusers <visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">08/23/2013 03:11 AM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">Re: [Visualpython-users]
is there a label attribute for objects?</font>
<br>
<hr noshade>
<br>
<br>
<br><font size=3 face="Roman">You can define a new simple label function
of your own, which is "attached" to an object like the following
example:<br>
<br>
from visual import *<br>
<br>
bb = box()<br>
<br>
def objLabel(object, **kwargs):<br>
ll = label(pos=object.pos, **kwargs)<br>
return ll<br>
<br>
<br>
ol = objLabel(bb, text="Center of a Box")<br>
<br>
So now instead of using VPython label function, they can use objLabel function,
with an object attached to it.<br>
<br>
Kadir</font>
<br>
<br>
<br>
<hr><font size=2 face="Arial"><b>From:</b> Mark Janssen <[email protected]><b><br>
To:</b> Paul Camp <[email protected]> <b><br>
Cc:</b> vpusers <visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org> <b><br>
Sent:</b> Friday, August 23, 2013 2:06 AM<b><br>
Subject:</b> Re: [Visualpython-users] is there a label attribute for objects?</font>
<br><font size=3 face="Roman"><br>
That's an interesting idea. Most Labels *are* attached to objects.<br>
If an objects label attribute is None, display nothing.<br>
<br>
The problem is that Label currently has it's *own* set of attributes,<br>
so one would have to make all Labels have the same characteristics<br>
(which might be acceptable and 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 Performance Central, a new site from SourceForge and <br>
AppDynamics. Performance Central is your source for news, insights, <br>
analysis and resources for efficient Application Performance Management.
<br>
Visit us today!</font><font size=3 color=blue face="Roman"><u><br>
</u></font><a href target=_blank><font size=3 color=blue face="Roman"><u>http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk</u></font></a><font size=3 face="Roman"><br>
_______________________________________________<br>
Visualpython-users mailing list</font><font size=3 color=blue face="Roman"><u><br>
</u></font><a href><font size=3 color=blue face="Roman"><u>Visualpython-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org</u></font></a><font size=3 color=blue face="Roman"><u><br>
</u></font><a href target=_blank><font size=3 color=blue face="Roman"><u>https://lists.sourceforge.net/lists/listinfo/visualpython-users</u></font></a><font size=3 face="Roman"><br>
<br>
</font>
<br>
--=_alternative 005AD32A85257BD0_=--
--===============5103143317916127120==
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
--===============5103143317916127120==
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
--===============5103143317916127120==--