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. 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 <[email protected]><br><b><span style=3D"font-weight: bold;">To:</span></b> hwg <[email protected]>; 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 <<a ymailt= o=3D"mailto:[email protected]" href=3D"mailto:[email protected]">hwg434@yahoo= .com</a>> wrote:<br><br>>I tried:<br>><br>><br>>self.compone= nts.TextArea1.font_size =3D sliderValue<br>><br>>It doesn't throw an = exception, but it doesn't change the font size, either. Also, oddly, = the slider never seems to lose focus. It keeps sliding back and forth= even after the mouse is released and no longer over the slider. I ca= n't get focus on the TextArea.<br>><br>><br>><br>>- hwg<br>>= <br>><br>><br>><br>><br>>>________________________= ________<br>>>From: "<a ymailto=3D"mailto:[email protected]" href=3D"= mailto:[email protected]">[email protected]</a>" <<a ymailto=3D"mailto:e= [email protected]" href=3D"mailto:[email protected]">[email protected]</a>&g= t;<br>>>To: hwg <<a ymailto=3D"mailto:[email protected]" href=3D"mailto:[email protected]">[email protected]</a>><br>>>Cc: "= <a ymailto=3D"mailto:[email protected]" href=3D"mailto= :[email protected]">[email protected]= .net</a>" <<a ymailto=3D"mailto:[email protected]" = href=3D"mailto:[email protected]">pythoncard-users@lis= ts.sourceforge.net</a>><br>>>Sent: Saturday, June 18, 2011 11:45 P= M<br>>>Subject: Re: [Pythoncard-users] Dynamically change font size o= f a TextArea<br>>><br>>><br>>> font is not a dictionary.&= nbsp; It's a class. Try font._size<br>>><br>>>On 6/17/201= 1 1:23 PM, hwg wrote: <br>>>from PythonCard import model<br>>>&= gt;class MainWindow(model.Background):<br>>>> def = ; on_Slider1_mouseUp(self, event):<br>>>> &= nbsp; sliderValue =3D self.components.Slider1.value<br>>>>  = ; self.components.TextArea1.font['size'] =3D sliderValue<br>>= >> <br>>>>app =3D model.Application(MainWindow)<br>>= >>app.MainLoop()<br>>><br>>><br>>>-- <br>>Kim Ch= eung<br>>><br>>><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==--