Re: Dynamically change font size of a TextArea
hwg <[email protected]> Sun, 19 Jun 2011 11:27:46 -0700 (PDT)
| Newsgroups | gmane.comp.python.pythoncard |
|---|---|
| Message-ID | <[email protected]> |
--===============7043332188925681412== Content-Type: multipart/alternative; boundary="0-1994744967-1308508066=:66273" --0-1994744967-1308508066=:66273 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I tried:=0A=0A=0Aself.components.TextArea1.font_size =3D sliderValue=0A=0AI= t doesn't throw an exception, but it doesn't change the font size, either.= =A0 Also, oddly, the slider never seems to lose focus.=A0 It keeps sliding = back and forth even after the mouse is released and no longer over the slid= er.=A0 I can't get focus on the TextArea.=0A=0A=0A=0A- hwg=0A=A0 =0A=0A=0A= =0A=0A>________________________________=0A>From: "[email protected]" <ecs17= [email protected]>=0A>To: hwg <[email protected]>=0A>Cc: "pythoncard-users@lists.= sourceforge.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.Applicatio= n(MainWindow)=0A>>app.MainLoop()=0A>=0A>=0A>-- =0AKim Cheung=0A>=0A> --0-1994744967-1308508066=:66273 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>I tried:<br></span></= div><div><br><span></span></div><div style=3D"margin-left: 40px;"><span>sel= f.components.TextArea1.font_size =3D sliderValue</span></div><div><br><span= ></span></div><div><span>It doesn't throw an exception, but it doesn't chan= ge the font size, either. Also, oddly, the slider never seems to lose= focus. It keeps sliding back and forth even after the mouse is relea= sed and no longer over the slider. I can't get focus on the TextArea.= <br></span></div><div><span><br></span></div><div><span><br></span></div><d= iv><span>- hwg</span></div><div><span> </span></div><div><br><blockqu= ote style=3D"border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; pad= ding-left: 5px;"><div style=3D"font-family: arial, helvetica, sans-serif; f= ont-size: 10pt;"><div style=3D"font-family: times new roman, new york, time= s, 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> "[email protected]" <= ;[email protected]><br><b><span style=3D"font-weight: bold;">To:</span><= /b> hwg <[email protected]><br><b><span style=3D"font-weight: bold;">C= c:</span></b> "[email protected]" <pythoncard-users= @lists.sourceforge.net><br><b><span style=3D"font-weight: bold;">Sent:</= span></b> Saturday, June 18, 2011 11:45 PM<br><b><span style=3D"font-weight= : bold;">Subject:</span></b> Re: [Pythoncard-users] Dynamically change font= size of a TextArea<br></font><br>=0A<div id=3D"yiv528882915">=0A=0A =0A= =0A =0A <title></title>=0A =0A =0A font is not a dictionary.&nbs= p; It's a class. Try font._size<br>=0A <br>=0A On 6/17/2011 1:2= 3 PM, hwg wrote:=0A <blockquote type=3D"cite">=0A <div style=3D"">f= rom PythonCard import model<br>=0A class MainWindow(model.Background= ):<br>=0A def on_Slider1_mouseUp(self, event):<br= >=0A sliderValue =3D self.compo= nents.Slider1.value<br>=0A  = ;self.components.TextArea1.font['size'] =3D sliderValue<br>=0A  = ;<var id=3D"yiv528882915yui-ie-cursor"></var><br style=3D"">=0A app = =3D model.Application(MainWindow)<br>=0A app.MainLoop()</div>=0A = </blockquote>=0A <br>=0A <br>=0A <pre class=3D"yiv528882915moz-sig= nature">-- =0AKim Cheung</pre>=0A =0A=0A</div><br><br></div></div></blockq= uote></div></div></body></html> --0-1994744967-1308508066=:66273-- --===============7043332188925681412== 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 --===============7043332188925681412== 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 --===============7043332188925681412==--