Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 4:16 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: List Boxes
PostPosted: May 19th, 2012, 1:05 pm 
Offline

Joined: April 13th, 2010, 10:38 am
Posts: 15
Hi All

I can populate a list box from a text file, but I am struggling to read an item from the list box into a variable.

var seq=OpenFile(SYSTEM_PUBLICATION_DIR + "\\fam.txt")
seq.ReadField(false)

mylistbox.SetListBoxSelection(0)
var gotList=mylistbox.GetSelection()
Debug.trace("vargotList = " + vargotList + "/n")

I get [object] returned.

I have searched the forums, but have not found a solution.

Any help would be gratefully received.


For this message bizzybee has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: List Boxes
PostPosted: May 20th, 2012, 2:24 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Hey, welcome to the Opus forum.

The simplest thing I can think of is this. Edit the Properties of your Listbox. Go to the Tab for 'Listbox'. You should see two options there to associate an Opus Page or Pub variable to your Listbox INDEX, and the SELECTION. Make that association.

Then when you do something like
Code:
mylistbox.SetListBoxSelection(0)
the variable associated with SELECTION will have the value of the text contents of that line of the Listbox.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 34 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group