Creating a second column in a listbox... 
Author Message
 Creating a second column in a listbox...

More listbox questions.  I'm trying to create a 2 column listbox, here is
the code:

  //Adds an entry to the file listbox
  fileList.addRow(fid)
  fileList.cell(fileList.lastindex, 1) = sid

So the first line adds a row to the listbox with the variable 'fid' as the
argument, the second line adds to the same row, in the second column with
the variable 'sid' as the argument.  Both sid and fid exist I checked, but
only the first column gets anything added to it, what am I doing wrong.
This is essentialy right out of Matt's book (p. 359).

Thanks,
Sam



Mon, 02 Feb 2004 03:34:12 GMT  
 Creating a second column in a listbox...

Quote:

> More listbox questions.  I'm trying to create a 2 column listbox, here is
> the code:

>   //Adds an entry to the file listbox
>   fileList.addRow(fid)
>   fileList.cell(fileList.lastindex, 1) = sid

> So the first line adds a row to the listbox with the variable 'fid' as the
> argument, the second line adds to the same row, in the second column with
> the variable 'sid' as the argument.  Both sid and fid exist I checked, but
> only the first column gets anything added to it, what am I doing wrong.
> This is essentialy right out of Matt's book (p. 359).

But what's the columncount...? (And what's the columnwidths...?) m.

--

*** REALbasic, The Definitive Guide! ***
http://www.oreilly.com/catalog/realbasic/



Mon, 02 Feb 2004 11:28:40 GMT  
 Creating a second column in a listbox...

Quote:



> > More listbox questions.  I'm trying to create a 2 column listbox, here is
> > the code:

> >   //Adds an entry to the file listbox
> >   fileList.addRow(fid)
> >   fileList.cell(fileList.lastindex, 1) = sid

> > So the first line adds a row to the listbox with the variable 'fid' as the
> > argument, the second line adds to the same row, in the second column with
> > the variable 'sid' as the argument.  Both sid and fid exist I checked, but
> > only the first column gets anything added to it, what am I doing wrong.
> > This is essentialy right out of Matt's book (p. 359).

> But what's the columncount...? (And what's the columnwidths...?) m.

Column count is set to =2 and columnwidths are 1200, I set it to 300 too
and that didn't make a difference.

Sam



Tue, 03 Feb 2004 00:54:13 GMT  
 Creating a second column in a listbox...

Quote:





> > > More listbox questions.  I'm trying to create a 2 column listbox, here is
> > > the code:

> > >   //Adds an entry to the file listbox
> > >   fileList.addRow(fid)
> > >   fileList.cell(fileList.lastindex, 1) = sid

> > > So the first line adds a row to the listbox with the variable 'fid' as the
> > > argument, the second line adds to the same row, in the second column with
> > > the variable 'sid' as the argument.  Both sid and fid exist I checked, but
> > > only the first column gets anything added to it, what am I doing wrong.
> > > This is essentialy right out of Matt's book (p. 359).

> > But what's the columncount...? (And what's the columnwidths...?) m.

> Column count is set to =2 and columnwidths are 1200, I set it to 300 too
> and that didn't make a difference

Can you reduce your code to about five lines total and show all of it? I'm
not seeing enough here to analyze what the problem might be. m.

--

*** REALbasic, The Definitive Guide! ***
http://www.oreilly.com/catalog/realbasic/



Tue, 03 Feb 2004 04:49:08 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. interpreting the second profiling column of Ruby profiler

2. listbox column number ??

3. Listbox add row to different columns

4. Rearranging listbox columns

5. Changing Database-Bound ListBox Column Order

6. Numerical sort in listbox columns

7. Counting Columns in Listbox

8. Dynamically adding columns to a listbox

9. How to change listbox column text at runtime??

10. Need Various Pictures for Listbox Column

11. Re Listbox sorting with column headings

12. Listbox with column selection not being selected

 

 
Powered by phpBB® Forum Software