>>This will give you the data from the 4th column of any row clicked as
it looks like you're only concerned with the 4th column.
I believe that's the 5th column :)
-----Original Message-----
From: gettingstarted-bounces at lists dot realsoftware dot com
[mailto:gettingstarted-bounces at lists dot realsoftware dot com] On Behalf Of
RBNUBE
Sent: Thursday, September 30, 2004 10:39 PM
To: 'Getting Started'
Subject: RE: Getting data out of a ListBox cell
The code you were using seems to work when placed in the Change event,
but you will receive an out of bounds error if placed in the CellClick
event. Are you sure you placed it in the Change event?
It would be slightly simpler to use the following line in the
*CellClick* event of the ListBox:
EditField1.text = me.cell(row,column)
This will give you the data for any cell in any column clicked.
(OR)
EditField1.text = me.cell(row,4)
This will give you the data from the 4th column of any row clicked as it
looks like you're only concerned with the 4th column.
-----Original Message-----
From: gettingstarted-bounces at lists dot realsoftware dot com
[mailto:gettingstarted-bounces at lists dot realsoftware dot com] On Behalf Of
Greg
Olson-Hyde
Sent: Thursday, September 30, 2004 12:29 AM
To: Started Getting
Subject: Getting data out of a ListBox cell
G'day All,
How do I get data out of a specific cell in a clicked row?
If in the 'Change' event of a ListBox I use:
EditField1.text= me.cell(7,4)
The EditField displays the data from the correct cell in the hard coded
row.
But... if I use:
Dim i As integer = me.listIndex
EditField1.text= me.cell(i,4)
I get an "out of bounds error" and the app shuts down.
All I want to do is to display the data from the column in the clicked
row in an EditField - how do I do it?
RB 5.5.2, Mac OS X 10.3.5
Cheers
Greg
Sydney Australia
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|