Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 3rd, 2024, 6:24 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: calculate how much index in a listbox
PostPosted: February 11th, 2005, 9:58 am 
Offline

Joined: November 3rd, 2004, 12:12 pm
Posts: 117
Location: France - Bretagne
Hi,
how can i calculate the number of index on a specific listbox (I want to know how much line (index) there is in my listbox and store that number in a variable).

Thank you
Benoit

_________________
Opus Pro 06, Win XP.


For this message benoit has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 11th, 2005, 4:11 pm 
Offline

Joined: November 9th, 2004, 10:35 am
Posts: 49
Location: Canterbury UK
I found a way of doing this but it's not very elegant!

I could not find a direct way of counting the lines in a listbox so....

Copy the listbox to the clipboard
Read back into a text box
count number of lines in textbox
pass to new variable and display

Hope this helps

Andy


You do not have the required permissions to view the files attached to this post.


For this message Andy Piddock has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 11th, 2005, 4:45 pm 
Offline

Joined: November 3rd, 2004, 12:12 pm
Posts: 117
Location: France - Bretagne
Super ! That do the job.



thank you very much

Benoit

_________________
Opus Pro 06, Win XP.


For this message benoit has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 11th, 2005, 4:52 pm 
Offline

Joined: November 4th, 2004, 11:01 am
Posts: 21
Location: Banbury, UK
alternatively you could add a script action with the following line of code...

Variable = ListBox.GetLineCount()

where 'Variable' is the name of the variable where you want to store the number of lines and 'Listbox' is the name of your listbox object.


Alan Dews
Senior Developer
Digital Workshop

_________________
Alan Dews
Senior Developer
Digital Workshop


For this message Alan Dews has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 11th, 2005, 5:09 pm 
Offline

Joined: November 9th, 2004, 10:35 am
Posts: 49
Location: Canterbury UK
Hi Alan,

Yes that's what I tried first, but could not get the function to work.
Have you tried it?

Andy


For this message Andy Piddock has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 11th, 2005, 5:23 pm 
Offline

Joined: November 3rd, 2004, 12:12 pm
Posts: 117
Location: France - Bretagne
me, i have tried it and that work too ...

Thank you
Benoit

_________________
Opus Pro 06, Win XP.


For this message benoit has been thanked by : mackavi


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group