Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

re: listbox (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Move it to the back
Next thread: Re: Re: math error


Win32 API Declares   -   Berg, Heath
  re: listbox   -  
   Re: listbox   -   Sven E Olsson
   Re: listbox   -   Sven E Olsson
   Re: listbox   -   CV

re: listbox
Date: 02.08.06 22:54 (Wed, 2 Aug 2006 17:54:14 -0400)
From:
Hi there.

I have no idea what I'm doing wrong.

this should be so simple. All I want to do is add a string to a listbox cell.

I have 5 column, and I want to put the information into cell 0,0... yet I always get an out of bounds
error.

Help?

Sub Action()
'when this button is pushed, add a field to a cell

listbox1.addrow " "
listbox1.Cell (0,0) = "bill"
listbox1.ColumnCount = 5

End Sub

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: listbox
Date: 02.08.06 23:17 (Thu, 3 Aug 2006 00:17:49 +0200)
From: Sven E Olsson

On 2006-08-02, at 11:54 PM, <<email address removed>>
<<email address removed>> wrote:

> Hi there.
>
> I have no idea what I'm doing wrong.
>
> this should be so simple. All I want to do is add a string to a
> listbox cell.
>
> I have 5 column, and I want to put the information into cell 0,0...
> yet I always get an out of bounds
> error.
>
> Help?
>
> Sub Action()
> 'when this button is pushed, add a field to a cell
>
> listbox1.addrow " "
> listbox1.Cell (0,0) = "bill"
> listbox1.ColumnCount = 5
>
> End Sub
>

You have to set column count in the Listbox open event or in the
property pane

in your pushbutton:

Listbox1.addrow ""
Listbox1.cell(Listbox1.LastIndex,0) = "This is col 1")
Listbox1.cell(Listbox1.LastIndex,1) = "This is col 2")
Listbox1.cell(Listbox1.LastIndex,2) = "This is col 3")
Listbox1.cell(Listbox1.LastIndex,3) = "This is col 4")
.....


Sven E



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: listbox
Date: 02.08.06 23:27 (Thu, 3 Aug 2006 00:27:03 +0200)
From: Sven E Olsson

On 2006-08-03, at 12:17 AM, Sven E Olsson wrote:

>
> On 2006-08-02, at 11:54 PM, <<email address removed>>
> <<email address removed>> wrote:
>
>> Hi there.
>>
>> I have no idea what I'm doing wrong.
>>
> in your pushbutton:
>
> Listbox1.addrow ""
> Listbox1.cell(Listbox1.LastIndex,0) = "This is col 1")
> Listbox1.cell(Listbox1.LastIndex,1) = "This is col 2")
> Listbox1.cell(Listbox1.LastIndex,2) = "This is col 3")
> Listbox1.cell(Listbox1.LastIndex,3) = "This is col 4")
> .....
>
> Sven E
>

Sorry remove the last ) ... time to sleep...
Sven E
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: listbox
Date: 03.08.06 01:19 (Wed, 2 Aug 2006 17:19:20 -0700)
From: CV
The code you've posted below is fine. If doesn't generate an out of
bounds error. Do you have some other code in the project? Set your
debugger to break on exceptions if you haven't already.

Best,

Jack



On Aug 2, 2006, at 2:54 PM, <<email address removed>>
<<email address removed>> wrote:

> Hi there.
>
> I have no idea what I'm doing wrong.
>
> this should be so simple. All I want to do is add a string to a
> listbox cell.
>
> I have 5 column, and I want to put the information into cell 0,0...
> yet I always get an out of bounds
> error.
>
> Help?
>
> Sub Action()
> 'when this button is pushed, add a field to a cell
>
> listbox1.addrow " "
> listbox1.Cell (0,0) = "bill"
> listbox1.ColumnCount = 5
>
> End Sub
>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>