Re: Dynamically change font size of a TextArea

hwg <[email protected]> Mon, 20 Jun 2011 15:56:01 -0700 (PDT)
Newsgroups gmane.comp.python.pythoncard
Message-ID <[email protected]>
--===============8935374684622309247==
Content-Type: multipart/alternative; boundary="0-792470443-1308610561=:20580"

--0-792470443-1308610561=:20580
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

That doesn't work, either.=A0 If I print self.components.TextArea1.font aft=
er changing it, the size appears to be changing, but the actual font size i=
n the TextArea does not change.=0A=0A=0A- hwg=0A=0A=0A=0A=0A=0A=0A=0A=0A>__=
______________________________=0A>From: Kim Cheung <[email protected]>=0A>T=
o: hwg <[email protected]>; [email protected]=0A>Sent: =
Monday, June 20, 2011 12:23 AM=0A>Subject: Re: [Pythoncard-users] Dynamical=
ly change font size of a TextArea=0A>=0A>You are missing a dot=0A>=0A>=0A>h=
wg <[email protected]> wrote:=0A>=0A>>I tried:=0A>>=0A>>=0A>>self.components=
.TextArea1.font_size =3D sliderValue=0A>>=0A>>It doesn't throw an exception=
, but it doesn't change the font size, either.=A0 Also, oddly, the slider n=
ever seems to lose focus.=A0 It keeps sliding back and forth even after the=
 mouse is released and no longer over the slider.=A0 I can't get focus on t=
he TextArea.=0A>>=0A>>=0A>>=0A>>- hwg=0A>>=A0 =0A>>=0A>>=0A>>=0A>>=0A>>>___=
_____________________________=0A>>>From: "[email protected]" <ecs1749@gmail=
.com>=0A>>>To: hwg <[email protected]>=0A>>>Cc: "[email protected]=
ceforge.net" <[email protected]>=0A>>>Sent: Saturday, =
June 18, 2011 11:45 PM=0A>>>Subject: Re: [Pythoncard-users] Dynamically cha=
nge font size of a TextArea=0A>>>=0A>>>=0A>>> font is not a dictionary.=A0 =
It's a class.=A0 Try font._size=0A>>>=0A>>>On 6/17/2011 1:23 PM, hwg wrote:=
 =0A>>>from PythonCard import model=0A>>>>class MainWindow(model.Background=
):=0A>>>>=A0=A0 def=A0 on_Slider1_mouseUp(self, event):=0A>>>>=A0=A0=A0=A0=
=A0=A0 sliderValue =3D self.components.Slider1.value=0A>>>>=A0=A0=A0=A0=A0=
=A0=A0self.components.TextArea1.font['size'] =3D sliderValue=0A>>>>=A0=0A>>=
>>app =3D model.Application(MainWindow)=0A>>>>app.MainLoop()=0A>>>=0A>>>=0A=
>>>-- =0A>>Kim Cheung=0A>>>=0A>>>=0A>=0A>
--0-792470443-1308610561=:20580
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:ar=
ial, helvetica, sans-serif;font-size:10pt"><div><span>That doesn't work, ei=
ther.&nbsp; If I print self.components.TextArea1.font after changing it, th=
e size appears to be changing, but the actual font size in the TextArea doe=
s not change.</span></div><div><br><span></span></div><div><br><span></span=
></div><div><span>- hwg<br></span></div><div><br><span></span></div><div><s=
pan><br></span></div><div><br><span></span></div><div><span><br></span></di=
v><div><br><blockquote style=3D"border-left: 2px solid rgb(16, 16, 255); ma=
rgin-left: 5px; padding-left: 5px;"><div style=3D"font-family: arial, helve=
tica, sans-serif; font-size: 10pt;"><div style=3D"font-family: times new ro=
man, new york, times, serif; font-size: 12pt;"><font size=3D"2" face=3D"Ari=
al"><hr size=3D"1"><b><span style=3D"font-weight:bold;">From:</span></b> Ki=
m Cheung &lt;[email protected]&gt;<br><b><span style=3D"font-weight:
 bold;">To:</span></b> hwg &lt;[email protected]&gt;; pythoncard-users@lists=
.sourceforge.net<br><b><span style=3D"font-weight: bold;">Sent:</span></b> =
Monday, June 20, 2011 12:23 AM<br><b><span style=3D"font-weight: bold;">Sub=
ject:</span></b> Re: [Pythoncard-users] Dynamically change font size of a T=
extArea<br></font><br>=0AYou are missing a dot<br><br><br>hwg &lt;<a ymailt=
o=3D"mailto:[email protected]" href=3D"mailto:[email protected]">hwg434@yahoo=
.com</a>&gt; wrote:<br><br>&gt;I tried:<br>&gt;<br>&gt;<br>&gt;self.compone=
nts.TextArea1.font_size =3D sliderValue<br>&gt;<br>&gt;It doesn't throw an =
exception, but it doesn't change the font size, either.&nbsp; Also, oddly, =
the slider never seems to lose focus.&nbsp; It keeps sliding back and forth=
 even after the mouse is released and no longer over the slider.&nbsp; I ca=
n't get focus on the TextArea.<br>&gt;<br>&gt;<br>&gt;<br>&gt;- hwg<br>&gt;=
&nbsp; <br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;&gt;________________________=
________<br>&gt;&gt;From: "<a ymailto=3D"mailto:[email protected]" href=3D"=
mailto:[email protected]">[email protected]</a>" &lt;<a ymailto=3D"mailto:e=
[email protected]" href=3D"mailto:[email protected]">[email protected]</a>&g=
t;<br>&gt;&gt;To: hwg &lt;<a ymailto=3D"mailto:[email protected]"
 href=3D"mailto:[email protected]">[email protected]</a>&gt;<br>&gt;&gt;Cc: "=
<a ymailto=3D"mailto:[email protected]" href=3D"mailto=
:[email protected]">[email protected]=
.net</a>" &lt;<a ymailto=3D"mailto:[email protected]" =
href=3D"mailto:[email protected]">pythoncard-users@lis=
ts.sourceforge.net</a>&gt;<br>&gt;&gt;Sent: Saturday, June 18, 2011 11:45 P=
M<br>&gt;&gt;Subject: Re: [Pythoncard-users] Dynamically change font size o=
f a TextArea<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; font is not a dictionary.&=
nbsp; It's a class.&nbsp; Try font._size<br>&gt;&gt;<br>&gt;&gt;On 6/17/201=
1 1:23 PM, hwg wrote: <br>&gt;&gt;from PythonCard import model<br>&gt;&gt;&=
gt;class MainWindow(model.Background):<br>&gt;&gt;&gt;&nbsp;&nbsp; def&nbsp=
; on_Slider1_mouseUp(self, event):<br>&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; sliderValue =3D
 self.components.Slider1.value<br>&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;self.components.TextArea1.font['size'] =3D sliderValue<br>&gt;=
&gt;&gt;&nbsp;<br>&gt;&gt;&gt;app =3D model.Application(MainWindow)<br>&gt;=
&gt;&gt;app.MainLoop()<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;-- <br>&gt;Kim Ch=
eung<br>&gt;&gt;<br>&gt;&gt;<br><br></div></div></blockquote></div></div></=
body></html>
--0-792470443-1308610561=:20580--


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

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
--===============8935374684622309247==
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

--===============8935374684622309247==--