is there an example of a "widget" that reads a file onto it?

Hi Gary and All

>
> > Have you seen the ticker in the demo? Sounds like that might do it for
> > scrolling text. It uses a textCtrl. You can just read a text file in the
> > normal Python way, and set what text you want as the value of the textCtrl,
> > and use that textCtrl in the ticker.
>
>
> I think I saw that, "textCtrl," but nothing about ticker.
> I'm not clear on how to use the wxPython pages, so yes, I
> may be jumping the gun here. I typed "text" into the search
> area; then "file", then "file, read".

You sound like you haven't downloaded and installed the wxpython package yet.

Inside the wxpython package is an extensive set of demos, including a
GUI file picker. Once you have picked a file, you can use python to
read the contents in, and then use a TextCtrl (careful about the
capitalization - it can be significant) to display it as you wish.
Take a look at the "Ticker" demo in the "More Windows/Controls"
section of the Demo.

You can get the wxpython package for your OS of choice here:
Redirecting...
Note that you want a version of wxpython that matches your installed
version of python.

  Well, I found the demo files for my OS and modified TextCtrl.py
  yesterday. For my next trick:: to open a file and print into
  one of the two text-areas I have left.

  I also found the font-selection code that will let the user
  select his font-of-choice. Sooooo, pretty soon I'll be able to
  drop in my non-GUI functions.

  Got to say that this looks like the best new language I've
  studied! Cool++ :slight_smile:

  gary

  [[ ... ]]

ยทยทยท

On Sun, Mar 02, 2008 at 04:40:36PM -0500, D. Scott Katzer wrote:

On Sun, Mar 2, 2008 at 4:23 PM, Gary Kline <kline@thought.org> wrote:

--
  Gary Kline kline@thought.org www.thought.org Public Service Unix
        http://jottings.thought.org http://transfinite.thought.org