Re: Getting the number of lines (entries) in a textarea widget

Kevin Altis <[email protected]>
Newsgroups gmane.comp.python.pythoncard
Message-ID <[email protected]>
On Nov 14, 2007, at 11:20 PM, Tony Cappellini wrote:

> I've printed a list of filenames in a textarea widget.
>
> I want to see how many filenames are in the widget.
>
> When I call GetNumberOfLines() or getNumberOfLines(), they both  
> return 1.
>
> Is there a way to query the widget to actually get the number of  
> items printed ?
>
>
> thanks

self.components.yourComponentNameHere.getNumberOfLines() should work.  
If it doesn't, then I would like to know what the line endings are as  
well as which platform and versions of wxPython and PythonCard you're  
using.

If you end up using a List component instead then getCount() is the  
method you want.

ka

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.