Re: Dynamically change font size of a TextArea

hwg <[email protected]> Wed, 22 Jun 2011 07:12:54 -0700 (PDT)
Newsgroups gmane.comp.python.pythoncard
Message-ID <[email protected]>
--===============5876228958930345569==
Content-Type: multipart/alternative; boundary="0-2063283643-1308751974=:79510"

--0-2063283643-1308751974=:79510
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks.=A0 The help is much appreciated!=0A=0A=0Ahwg=0A=0A=0A=0A>__________=
______________________=0A>From: Lawrence Abbott <[email protected]>=0A>To: h=
wg <[email protected]>=0A>Cc: pythoncard-users <[email protected]=
eforge.net>=0A>Sent: Tuesday, June 21, 2011 10:12 PM=0A>Subject: Re: [Pytho=
ncard-users] Dynamically change font size of a TextArea=0A>=0A>On-line docu=
mentation is going to do a more thorough and accurate=A0 job=0A>than I can =
do :( ....try these=0A>=0A>http://wiki.wxpython.org/EventPropagation=0A>htt=
p://wiki.wxpython.org/self.Bind%20vs.%20self.button.Bind=0A>=0A>remembering=
 PythonCard is a wrapper of wxpython=0A>=0A>Cheers,=0A>Lawrie=0A>=0A>On Wed=
, Jun 22, 2011 at 6:14 AM, hwg <[email protected]> wrote:=0A>> That's what I=
 needed.=A0 Working perfectly now.=A0 (I also removed the=0A>> unnecessary =
wx import.)=0A>> I don't understand why I need the event.Skip().=A0 If some=
one could explain,=0A>> it would be much appreciated.=0A>>=0A>> hwg=0A>>=0A=
>> ________________________________=0A>> From: Lawrence Abbott <lawabb@gmai=
l.com>=0A>> To: hwg <[email protected]>=0A>> Cc: pythoncard-users <pythoncar=
[email protected]>=0A>> Sent: Tuesday, June 21, 2011 2:06 PM=0A=
>> Subject: Re: [Pythoncard-users] Dynamically change font size of a TextAr=
ea=0A>>=0A>> Try adding an=0A>>=0A>> event.Skip()=0A>>=0A>> As mentioned pr=
eviously - no need for the wx import.=0A>>=0A>> Cheers,=0A>> Lawrie=0A>>=0A=
>> On Wed, Jun 22, 2011 at 1:43 AM, hwg <[email protected]> wrote:=0A>>> Law=
rie,=0A>>>=0A>>> That works.=A0 Thanks!=0A>>>=0A>>> I still have a weird is=
sue where the Slider doesn't give up focus.=A0 I=0A>>> start=0A>>> dragging=
 it, and when I release it (mouseUp), the event handler fires and=0A>>> the=
 font size changes.=A0 But I can't enter the TextArea, and the slider=0A>>>=
 still=0A>>> moves around as I move the mouse, even with no mouse buttons p=
ressed.=A0 I=0A>>> can't access the TextArea or the Menu, and I can't even =
close the=0A>>> PythonCard=0A>>> app window without going into the IDE and =
stopping the script from there.=0A>>>=0A>>> Any idea what's causing this?=
=0A>>>=0A>>> Complete code is attached.=0A>>>=0A>>>=0A>>> Thanks,=0A>>> hwg=
=0A>>>=0A>>>=0A>>> ________________________________=0A>>> From: Lawrence Ab=
bott <[email protected]>=0A>>> To: hwg <[email protected]>=0A>>> Cc: pythonca=
rd-users <[email protected]>=0A>>> Sent: Tue, June 21,=
 2011 7:45:50 AM=0A>>> Subject: Re: [Pythoncard-users] Dynamically change f=
ont size of a TextArea=0A>>>=0A>>> try=0A>>> font =3D self.components.TextA=
rea1.GetFont()=0A>>>=0A>>> instead of=0A>>> font =3D self.components.TextAr=
ea1.font=0A>>>=0A>>> also you will need to ensure the slider output values =
are legitimate font=0A>>> sizes=0A>>> also should be no need to import wx w=
ith SetPointSize method=0A>>>=0A>>> Cheers,=0A>>> Lawrie=0A>>>=0A>>>=0A>>> =
On Tue, Jun 21, 2011 at 10:23 PM, hwg <[email protected]> wrote:=0A>>>> I tr=
ied both of the methods below:=0A>>>> I get the following error:=0A>>>> Tra=
ceback (most recent call last):=0A>>>> =A0File "C:\Python25\lib\site-packag=
es\PythonCard\widget.py", line 408, in=0A>>>> _dispatch=0A>>>> handler(back=
ground, aWxEvent)=0A>>>> =A0File=0A>>>>=0A>>>>=0A>>>> "C:\Users\wsande\Docu=
ments\Warren\PythonScripts\PC_slider_text\pc_slider_text.py",=0A>>>> line 1=
1, in on_Slider1_mouseUp=0A>>>> font.SetPointSize(sliderValue)=0A>>>> Attri=
buteError: 'Font' object has no attribute 'SetPointSize'=0A>>>>=0A>>>> Here=
's the complete code:=0A>>>> # pc_slider_text.py=0A>>>> # try to change the=
 size of text font in a test box using a slider=0A>>>>=0A>>>> from wx impor=
t *=0A>>>> from PythonCard import model=0A>>>> class MainWindow(model.Backg=
round):=0A>>>> =A0=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 print sliderValue=0A>>>> =A0=A0=A0 =A0=A0=A0 font =3D self=
.components.TextArea1.font=0A>>>> =A0=A0=A0 =A0=A0=A0 font.SetPointSize(sli=
derValue)=0A>>>> =A0=A0=A0 =A0=A0=A0 self.components.TextArea1.SetFont(font=
)=0A>>>> =A0=A0=A0 =A0=A0=A0 print self.components.TextArea1.font=0A>>>>=0A=
>>>> app =3D model.Application(MainWindow)=0A>>>> app.MainLoop()=0A>>>>=0A>=
>>> ________________________________=0A>>>> From: Lawrence Abbott <lawabb@g=
mail.com>=0A>>>> To: hwg <[email protected]>=0A>>>> Sent: Monday, June 20, 2=
011 10:37 PM=0A>>>> Subject: Re: [Pythoncard-users] Dynamically change font=
 size of a=0A>>>> TextArea=0A>>>>=0A>>>> A slightly cleaner way=0A>>>>=0A>>=
>> =A0 =A0 =A0 =A0 font =3D self.components.TextArea1.GetFont()=0A>>>> =A0 =
=A0 =A0 =A0 font.SetPointSize(16)=0A>>>> =A0 =A0 =A0 =A0 self.components.Te=
xtArea1.SetFont(font)=0A>>>>=0A>>>> Cheers,=0A>>>> Lawrie=0A>>>>=0A>>>> On =
Tue, Jun 21, 2011 at 12:26 PM, Lawrence Abbott <[email protected]>=0A>>>> wr=
ote:=0A>>>>> Hi,=0A>>>>>=0A>>>>> self.components.TextArea1.font_size =3D sl=
iderValue=0A>>>>>=0A>>>>> doesnt work for me=0A>>>>>=0A>>>>> print self.com=
ponents.TextArea1.font.size=0A>>>>>=0A>>>>> gives a dictionary of font attr=
ibutes, but I can't get them to update=0A>>>>> either=0A>>>>>=0A>>>>> impor=
t wx=0A>>>>>=0A>>>>> font_size =3D16=0A>>>>>=0A>>>>> font1 =3D self.compone=
nts.TextArea1.GetFont()=0A>>>>> font2 =3D wx.Font(font_size, font1.Family, =
font1.Style, font1.Weight)=0A>>>>> self.components.TextArea1.SetFont( font2=
 )=0A>>>>>=0A>>>>> seems to work=0A>>>>>=0A>>>>> HTH,=0A>>>>> Lawrie=0A>>>>=
>=0A>>>>> On Mon, Jun 20, 2011 at 2:27 AM, hwg <[email protected]> wrote:=0A=
>>>>>> I tried:=0A>>>>>>=0A>>>>>> self.components.TextArea1.font_size =3D s=
liderValue=0A>>>>>> It doesn't throw an exception, but it doesn't change th=
e font size,=0A>>>>>> either.=0A>>>>>> Also, oddly, the slider never seems =
to lose focus.=A0 It keeps sliding=0A>>>>>> back=0A>>>>>> and forth even af=
ter the mouse is released and no longer over the=0A>>>>>> slider.=A0 I=0A>>=
>>>> can't get focus on the TextArea.=0A>>>>>>=0A>>>>>>=0A>>>>>> - hwg=0A>>=
>>>>=0A>>>>>>=0A>>>>>> ________________________________=0A>>>>>> From: "ecs=
[email protected]" <[email protected]>=0A>>>>>> To: hwg <[email protected]>=0A>=
>>>>> Cc: "[email protected]"=0A>>>>>> <pythoncard-use=
[email protected]>=0A>>>>>> Sent: Saturday, June 18, 2011 11:45 PM=
=0A>>>>>> Subject: Re: [Pythoncard-users] Dynamically change font size of a=
=0A>>>>>> TextArea=0A>>>>>>=0A>>>>>> font is not a dictionary.=A0 It's a cl=
ass.=A0 Try font._size=0A>>>>>>=0A>>>>>> On 6/17/2011 1:23 PM, hwg wrote:=
=0A>>>>>>=0A>>>>>> from PythonCard import model=0A>>>>>> class MainWindow(m=
odel.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 s=
liderValue=0A>>>>>>=0A>>>>>> app =3D model.Application(MainWindow)=0A>>>>>>=
 app.MainLoop()=0A>>>>>>=0A>>>>>> --=0A>>>>>> Kim Cheung=0A>>>>>>=0A>>>>>>=
=0A>>>>>>=0A>>>>>>=0A>>>>>>=0A>>>>>> --------------------------------------=
----------------------------------------=0A>>>>>> EditLive Enterprise is th=
e world's most technically advanced content=0A>>>>>> authoring tool. Experi=
ence the power of Track Changes, Inline Image=0A>>>>>> Editing and ensure c=
ontent is compliant with Accessibility Checking.=0A>>>>>> http://p.sf.net/s=
fu/ephox-dev2dev=0A>>>>>> _______________________________________________=
=0A>>>>>> Pythoncard-users mailing list=0A>>>>>> [email protected]=
rceforge.net=0A>>>>>> https://lists.sourceforge.net/lists/listinfo/pythonca=
rd-users=0A>>>>>>=0A>>>>>>=0A>>>>>=0A>>>>=0A>>>>=0A>>>>=0A>>>>=0A>>>>=0A>>>=
> -------------------------------------------------------------------------=
-----=0A>>>> EditLive Enterprise is the world's most technically advanced c=
ontent=0A>>>> authoring tool. Experience the power of Track Changes, Inline=
 Image=0A>>>> Editing and ensure content is compliant with Accessibility Ch=
ecking.=0A>>>> http://p.sf.net/sfu/ephox-dev2dev=0A>>>> ___________________=
____________________________=0A>>>> Pythoncard-users mailing list=0A>>>> Py=
[email protected]=0A>>>> https://lists.sourceforge.net/l=
ists/listinfo/pythoncard-users=0A>>>>=0A>>>>=0A>>>=0A>>=0A>>=0A>>=0A>=0A>=
=0A>
--0-2063283643-1308751974=:79510
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:Co=
urier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div><spa=
n>Thanks.&nbsp; The help is much appreciated!</span></div><div><br><span></=
span></div><div><span></span></div><div>hwg</div><div><br><blockquote style=
=3D"border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left=
: 5px;"><div style=3D"font-family: Courier New, courier, monaco, monospace,=
 sans-serif; font-size: 10pt;"><div style=3D"font-family: times new roman, =
new york, times, serif; font-size: 12pt;"><font size=3D"2" face=3D"Arial"><=
hr size=3D"1"><b><span style=3D"font-weight:bold;">From:</span></b> Lawrenc=
e Abbott &lt;[email protected]&gt;<br><b><span style=3D"font-weight: bold;">=
To:</span></b> hwg &lt;[email protected]&gt;<br><b><span style=3D"font-weigh=
t: bold;">Cc:</span></b> pythoncard-users &lt;[email protected]=
forge.net&gt;<br><b><span style=3D"font-weight: bold;">Sent:</span></b> Tue=
sday, June 21,
 2011 10:12 PM<br><b><span style=3D"font-weight: bold;">Subject:</span></b>=
 Re: [Pythoncard-users] Dynamically change font size of a TextArea<br></fon=
t><br>=0AOn-line documentation is going to do a more thorough and accurate&=
nbsp; job<br>than I can do :( ....try these<br><br>http://wiki.wxpython.org=
/EventPropagation<br>http://wiki.wxpython.org/self.Bind%20vs.%20self.button=
.Bind<br><br>remembering PythonCard is a wrapper of wxpython<br><br>Cheers,=
<br>Lawrie<br><br>On Wed, Jun 22, 2011 at 6:14 AM, hwg &lt;<a ymailto=3D"ma=
ilto:[email protected]" href=3D"mailto:[email protected]">[email protected]</a=
>&gt; wrote:<br>&gt; That's what I needed.&nbsp; Working perfectly now.&nbs=
p; (I also removed the<br>&gt; unnecessary wx import.)<br>&gt; I don't unde=
rstand why I need the event.Skip().&nbsp; If someone could explain,<br>&gt;=
 it would be much appreciated.<br>&gt;<br>&gt; hwg<br>&gt;<br>&gt; ________=
________________________<br>&gt; From: Lawrence Abbott &lt;<a ymailto=3D"ma=
ilto:[email protected]" href=3D"mailto:[email protected]">[email protected]</a=
>&gt;<br>&gt; To: hwg &lt;<a ymailto=3D"mailto:[email protected]"
 href=3D"mailto:[email protected]">[email protected]</a>&gt;<br>&gt; Cc: pyth=
oncard-users &lt;<a ymailto=3D"mailto:[email protected]=
t" href=3D"mailto:[email protected]">pythoncard-users@=
lists.sourceforge.net</a>&gt;<br>&gt; Sent: Tuesday, June 21, 2011 2:06 PM<=
br>&gt; Subject: Re: [Pythoncard-users] Dynamically change font size of a T=
extArea<br>&gt;<br>&gt; Try adding an<br>&gt;<br>&gt; event.Skip()<br>&gt;<=
br>&gt; As mentioned previously - no need for the wx import.<br>&gt;<br>&gt=
; Cheers,<br>&gt; Lawrie<br>&gt;<br>&gt; On Wed, Jun 22, 2011 at 1:43 AM, h=
wg &lt;<a ymailto=3D"mailto:[email protected]" href=3D"mailto:[email protected]=
om">[email protected]</a>&gt; wrote:<br>&gt;&gt; Lawrie,<br>&gt;&gt;<br>&gt;=
&gt; That works.&nbsp; Thanks!<br>&gt;&gt;<br>&gt;&gt; I still have a weird=
 issue where the Slider doesn't give up focus.&nbsp; I<br>&gt;&gt; start<br=
>&gt;&gt; dragging it, and when I release it (mouseUp), the event handler
 fires and<br>&gt;&gt; the font size changes.&nbsp; But I can't enter the T=
extArea, and the slider<br>&gt;&gt; still<br>&gt;&gt; moves around as I mov=
e the mouse, even with no mouse buttons pressed.&nbsp; I<br>&gt;&gt; can't =
access the TextArea or the Menu, and I can't even close the<br>&gt;&gt; Pyt=
honCard<br>&gt;&gt; app window without going into the IDE and stopping the =
script from there.<br>&gt;&gt;<br>&gt;&gt; Any idea what's causing this?<br=
>&gt;&gt;<br>&gt;&gt; Complete code is attached.<br>&gt;&gt;<br>&gt;&gt;<br=
>&gt;&gt; Thanks,<br>&gt;&gt; hwg<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; _____=
___________________________<br>&gt;&gt; From: Lawrence Abbott &lt;<a ymailt=
o=3D"mailto:[email protected]" href=3D"mailto:[email protected]">lawabb@gmail=
.com</a>&gt;<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: =
pythoncard-users &lt;<a
 ymailto=3D"mailto:[email protected]" href=3D"mailto:p=
[email protected]">[email protected]=
et</a>&gt;<br>&gt;&gt; Sent: Tue, June 21, 2011 7:45:50 AM<br>&gt;&gt; Subj=
ect: Re: [Pythoncard-users] Dynamically change font size of a TextArea<br>&=
gt;&gt;<br>&gt;&gt; try<br>&gt;&gt; font =3D self.components.TextArea1.GetF=
ont()<br>&gt;&gt;<br>&gt;&gt; instead of<br>&gt;&gt; font =3D self.componen=
ts.TextArea1.font<br>&gt;&gt;<br>&gt;&gt; also you will need to ensure the =
slider output values are legitimate font<br>&gt;&gt; sizes<br>&gt;&gt; also=
 should be no need to import wx with SetPointSize method<br>&gt;&gt;<br>&gt=
;&gt; Cheers,<br>&gt;&gt; Lawrie<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; On Tue=
, Jun 21, 2011 at 10:23 PM, hwg &lt;<a ymailto=3D"mailto:[email protected]" =
href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<br>&gt;&gt=
;&gt; I tried both of the methods below:<br>&gt;&gt;&gt; I get the followin=
g
 error:<br>&gt;&gt;&gt; Traceback (most recent call last):<br>&gt;&gt;&gt; =
&nbsp;File "C:\Python25\lib\site-packages\PythonCard\widget.py", line 408, =
in<br>&gt;&gt;&gt; _dispatch<br>&gt;&gt;&gt; handler(background, aWxEvent)<=
br>&gt;&gt;&gt; &nbsp;File<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; =
"C:\Users\wsande\Documents\Warren\PythonScripts\PC_slider_text\pc_slider_te=
xt.py",<br>&gt;&gt;&gt; line 11, in on_Slider1_mouseUp<br>&gt;&gt;&gt; font=
.SetPointSize(sliderValue)<br>&gt;&gt;&gt; AttributeError: 'Font' object ha=
s no attribute 'SetPointSize'<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Here's the co=
mplete code:<br>&gt;&gt;&gt; # <a target=3D"_blank" href=3D"http://pc_slide=
r_text.py">pc_slider_text.py</a><br>&gt;&gt;&gt; # try to change the size o=
f text font in a test box using a slider<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; fr=
om wx import *<br>&gt;&gt;&gt; from PythonCard import model<br>&gt;&gt;&gt;=
 class MainWindow(model.Background):<br>&gt;&gt;&gt; &nbsp;&nbsp;&nbsp;
 def&nbsp; on_Slider1_mouseUp(self, event):<br>&gt;&gt;&gt; &nbsp;&nbsp;&nb=
sp; &nbsp;&nbsp;&nbsp; sliderValue =3D self.components.Slider1.value<br>&gt=
;&gt;&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; print sliderValue<br>&gt;&g=
t;&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font =3D self.components.TextA=
rea1.font<br>&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; font.SetPoi=
ntSize(sliderValue)<br>&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; s=
elf.components.TextArea1.SetFont(font)<br>&gt;&gt;&gt; &nbsp;&nbsp;&nbsp; &=
nbsp;&nbsp;&nbsp; print self.components.TextArea1.font<br>&gt;&gt;&gt;<br>&=
gt;&gt;&gt; app =3D model.Application(MainWindow)<br>&gt;&gt;&gt; app.MainL=
oop()<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; ________________________________<br>&=
gt;&gt;&gt; From: Lawrence Abbott &lt;<a ymailto=3D"mailto:[email protected]=
" href=3D"mailto:[email protected]">[email protected]</a>&gt;<br>&gt;&gt;&gt;=
 To: hwg &lt;<a ymailto=3D"mailto:[email protected]"
 href=3D"mailto:[email protected]">[email protected]</a>&gt;<br>&gt;&gt;&gt; =
Sent: Monday, June 20, 2011 10:37 PM<br>&gt;&gt;&gt; Subject: Re: [Pythonca=
rd-users] Dynamically change font size of a<br>&gt;&gt;&gt; TextArea<br>&gt=
;&gt;&gt;<br>&gt;&gt;&gt; A slightly cleaner way<br>&gt;&gt;&gt;<br>&gt;&gt=
;&gt; &nbsp; &nbsp; &nbsp; &nbsp; font =3D self.components.TextArea1.GetFon=
t()<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; font.SetPointSize(16)<br>&g=
t;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; self.components.TextArea1.SetFont(fo=
nt)<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Cheers,<br>&gt;&gt;&gt; Lawrie<br>&gt;&=
gt;&gt;<br>&gt;&gt;&gt; On Tue, Jun 21, 2011 at 12:26 PM, Lawrence Abbott &=
lt;<a ymailto=3D"mailto:[email protected]" href=3D"mailto:[email protected]">=
[email protected]</a>&gt;<br>&gt;&gt;&gt; wrote:<br>&gt;&gt;&gt;&gt; Hi,<br>=
&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; self.components.TextArea1.font_size =
=3D sliderValue<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; doesnt work for
 me<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; print self.components.TextArea1=
.font.size<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; gives a dictionary of fo=
nt attributes, but I can't get them to update<br>&gt;&gt;&gt;&gt; either<br=
>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; import wx<br>&gt;&gt;&gt;&gt;<br>&gt;=
&gt;&gt;&gt; font_size =3D16<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; font1 =
=3D self.components.TextArea1.GetFont()<br>&gt;&gt;&gt;&gt; font2 =3D wx.Fo=
nt(font_size, font1.Family, font1.Style, font1.Weight)<br>&gt;&gt;&gt;&gt; =
self.components.TextArea1.SetFont( font2 )<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&=
gt;&gt; seems to work<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; HTH,<br>&gt;&=
gt;&gt;&gt; Lawrie<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; On Mon, Jun 20, =
2011 at 2:27 AM, hwg &lt;<a ymailto=3D"mailto:[email protected]" href=3D"mai=
lto:[email protected]">[email protected]</a>&gt; wrote:<br>&gt;&gt;&gt;&gt;&g=
t; I tried:<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;
 self.components.TextArea1.font_size =3D sliderValue<br>&gt;&gt;&gt;&gt;&gt=
; It doesn't throw an exception, but it doesn't change the font size,<br>&g=
t;&gt;&gt;&gt;&gt; either.<br>&gt;&gt;&gt;&gt;&gt; Also, oddly, the slider =
never seems to lose focus.&nbsp; It keeps sliding<br>&gt;&gt;&gt;&gt;&gt; b=
ack<br>&gt;&gt;&gt;&gt;&gt; and forth even after the mouse is released and =
no longer over the<br>&gt;&gt;&gt;&gt;&gt; slider.&nbsp; I<br>&gt;&gt;&gt;&=
gt;&gt; can't get focus on the TextArea.<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt=
;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; - hwg<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;=
&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; ________________________________<b=
r>&gt;&gt;&gt;&gt;&gt; From: "<a ymailto=3D"mailto:[email protected]" href=
=3D"mailto:[email protected]">[email protected]</a>" &lt;<a ymailto=3D"mail=
to:[email protected]" href=3D"mailto:[email protected]">[email protected]</=
a>&gt;<br>&gt;&gt;&gt;&gt;&gt; To: hwg &lt;<a ymailto=3D"mailto:hwg434@yaho=
o.com"
 href=3D"mailto:[email protected]">[email protected]</a>&gt;<br>&gt;&gt;&gt;&=
gt;&gt; Cc: "<a ymailto=3D"mailto:[email protected]" h=
ref=3D"mailto:[email protected]">pythoncard-users@list=
s.sourceforge.net</a>"<br>&gt;&gt;&gt;&gt;&gt; &lt;<a ymailto=3D"mailto:pyt=
[email protected]" href=3D"mailto:pythoncard-users@lists.=
sourceforge.net">[email protected]</a>&gt;<br>&gt;&gt;=
&gt;&gt;&gt; Sent: Saturday, June 18, 2011 11:45 PM<br>&gt;&gt;&gt;&gt;&gt;=
 Subject: Re: [Pythoncard-users] Dynamically change font size of a<br>&gt;&=
gt;&gt;&gt;&gt; TextArea<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; fo=
nt is not a dictionary.&nbsp; It's a class.&nbsp; Try font._size<br>&gt;&gt=
;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; On 6/17/2011 1:23 PM, hwg wrote:<br>&=
gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; from PythonCard import model<br=
>&gt;&gt;&gt;&gt;&gt; class
 MainWindow(model.Background):<br>&gt;&gt;&gt;&gt;&gt; &nbsp;&nbsp; def&nbs=
p; on_Slider1_mouseUp(self, event):<br>&gt;&gt;&gt;&gt;&gt; &nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; sliderValue =3D self.components.Slider1.value<br>&gt;=
&gt;&gt;&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.components.=
TextArea1.font['size'] =3D sliderValue<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&=
gt;&gt;&gt; app =3D model.Application(MainWindow)<br>&gt;&gt;&gt;&gt;&gt; a=
pp.MainLoop()<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; --<br>&gt;&gt=
;&gt;&gt;&gt; Kim Cheung<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;<br=
>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;<br>&g=
t;&gt;&gt;&gt;&gt; --------------------------------------------------------=
----------------------<br>&gt;&gt;&gt;&gt;&gt; EditLive Enterprise is the w=
orld's most technically advanced content<br>&gt;&gt;&gt;&gt;&gt; authoring =
tool. Experience the power of Track Changes, Inline
 Image<br>&gt;&gt;&gt;&gt;&gt; Editing and ensure content is compliant with=
 Accessibility Checking.<br>&gt;&gt;&gt;&gt;&gt; http://p.sf.net/sfu/ephox-=
dev2dev<br>&gt;&gt;&gt;&gt;&gt; ___________________________________________=
____<br>&gt;&gt;&gt;&gt;&gt; Pythoncard-users mailing list<br>&gt;&gt;&gt;&=
gt;&gt; <a ymailto=3D"mailto:[email protected]" href=
=3D"mailto:[email protected]">[email protected]=
ourceforge.net</a><br>&gt;&gt;&gt;&gt;&gt; <a href=3D"https://lists.sourcef=
orge.net/lists/listinfo/pythoncard-users" target=3D"_blank">https://lists.s=
ourceforge.net/lists/listinfo/pythoncard-users</a><br>&gt;&gt;&gt;&gt;&gt;<=
br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;=
<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; ----------=
--------------------------------------------------------------------<br>&gt=
;&gt;&gt; EditLive Enterprise is the world's most technically advanced
 content<br>&gt;&gt;&gt; authoring tool. Experience the power of Track Chan=
ges, Inline Image<br>&gt;&gt;&gt; Editing and ensure content is compliant w=
ith Accessibility Checking.<br>&gt;&gt;&gt; <a href=3D"http://p.sf.net/sfu/=
ephox-dev2dev" target=3D"_blank">http://p.sf.net/sfu/ephox-dev2dev</a><br>&=
gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt;=
 Pythoncard-users mailing list<br>&gt;&gt;&gt; <a ymailto=3D"mailto:Pythonc=
[email protected]" href=3D"mailto:[email protected]=
ceforge.net">[email protected]</a><br>&gt;&gt;&gt; <a =
href=3D"https://lists.sourceforge.net/lists/listinfo/pythoncard-users" targ=
et=3D"_blank">https://lists.sourceforge.net/lists/listinfo/pythoncard-users=
</a><br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;<br>&gt;<br>&gt;<br>&gt;<br=
><br><br></div></div></blockquote></div></div></body></html>
--0-2063283643-1308751974=:79510--


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

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
--===============5876228958930345569==
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

--===============5876228958930345569==--