Re: Dynamically change font size of a TextArea

John Henry <[email protected]> Sun, 19 Jun 2011 06:25:19 -0700
Newsgroups gmane.comp.python.pythoncard
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============8238458091646680144==
Content-Type: multipart/alternative;
	boundary="------------010804000900060703030707"

This is a multi-part message in MIME format.
--------------010804000900060703030707
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 6/18/2011 11:45 PM, [email protected] wrote:
> font is not a dictionary.  It's a class.  Try font._size
>
> On 6/17/2011 1:23 PM, hwg wrote:
>> from PythonCard import model
>> class MainWindow(model.Background):
>>    def  on_Slider1_mouseUp(self, event):
>>        sliderValue = self.components.Slider1.value
>>        self.components.TextArea1.font['size'] = sliderValue
>>
>> app = model.Application(MainWindow)
>> app.MainLoop()
>
>
> -- 
> Kim Cheung


--------------010804000900060703030707
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 6/18/2011 11:45 PM, <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> wrote:
    <blockquote cite="mid:[email protected]" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <title></title>
      font is not a dictionary.&nbsp; It's a class.&nbsp; Try font._size<br>
      <br>
      On 6/17/2011 1:23 PM, hwg wrote:
      <blockquote
        cite="mid:[email protected]"
        type="cite">
        <div style="right: auto;">from PythonCard import model<br>
          class MainWindow(model.Background):<br>
          &nbsp;&nbsp; def&nbsp; on_Slider1_mouseUp(self, event):<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sliderValue = self.components.Slider1.value<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.components.TextArea1.font['size'] = sliderValue<br>
          &nbsp;<var id="yui-ie-cursor"></var><br style="right: auto;">
          app = model.Application(MainWindow)<br>
          app.MainLoop()</div>
      </blockquote>
      <br>
      <br>
      <pre class="moz-signature" cols="72">-- 
Kim Cheung</pre>
    </blockquote>
    <br>
  </body>
</html>

--------------010804000900060703030707--


--===============8238458091646680144==
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
--===============8238458091646680144==
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

--===============8238458091646680144==--