New topic: 

how many instances of a control using the index property?

<http://forums.realsoftware.com/viewtopic.php?t=28003>

       Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic         Author  
Message       raimon           Post subject: how many instances of a control 
using the index property?Posted: Tue May 12, 2009 1:32 pm                       
 
Joined: Thu Sep 21, 2006 11:56 am
Posts: 88              Hello,

I can duplicate controls in a window using the index property.

I can access them like an array:

editfield(3).text="My editfiled number 3"

But I can't find a way to know how many of them I have, like:

msg str(editfield.ubound)

I can use window.ControlCount and loop through each control but sure there must 
be an easier way ...

thanks!

r.   
                            Top               Steve Garman           Post 
subject: Re: how many instances of a control using the index property?Posted: 
Tue May 12, 2009 1:38 pm                               
Joined: Fri Sep 30, 2005 3:53 pm
Posts: 2711
Location: England              I don't think there is an easier way.

The normal recommendation seems to be 
http://www.declaresub.com/article/17/how-do-i-determine-the-number-of-elements-in-a-control-array
     
_________________
Steve Garman
Using REALbasic 2008r2 Professional on Windows Vista Ultimate
Occasional blog  
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]     

-- 
Over 900 classes with 18000 functions in one REALbasic plug-in. 
The Monkeybread Software Realbasic Plugin v8.1. 

&lt;http://www.monkeybreadsoftware.de/realbasic/plugins.shtml&gt;

[email protected]

Reply via email to