Real Software Forums
http://forums.realsoftware.com/

ListBox Editable???
http://forums.realsoftware.com/viewtopic.php?f=10&t=47886
Page 1 of 1

Author:  RicSum [ Wed May 15, 2013 8:25 am ]
Post subject:  ListBox Editable???

Hi,
I have a really strange problem:

I started a brand new project; dragged a ListBox onto the empty window; and added the following code into the CellClick event:

me.EditCell(row, column)


When I run the app, the listbox is still not editable??????
Am I misssing something?

Thanks.

Author:  swineslife [ Wed May 15, 2013 8:34 am ]
Post subject:  Re: ListBox Editable???

need to add

me.celltype(row,column)=listbox.typeEditable

before that line - then it should work

Author:  RicSum [ Wed May 15, 2013 8:37 am ]
Post subject:  Re: ListBox Editable???

Tried that - still not working?????

The project is totally new and the window is completely empty apart from the listbox.
I have simply dragged a Listbox onto the empty window and added the code below to the CellCLick event:

me.celltype(row,column)=listbox.typeEditable
Me.EditCell(row,column)


No cells are editable - I am totally perplexed?????

Author:  RicSum [ Wed May 15, 2013 8:40 am ]
Post subject:  Re: ListBox Editable???

Could someone create an empty project with just a simple 2 column editable listbox for me to try and see if it works on my machine???

Thanks.

Author:  swineslife [ Wed May 15, 2013 8:43 am ]
Post subject:  Re: ListBox Editable???

need to populate the listbox with something

try
dim I as integer
for I =0 to 10
me.addrow str(I) // or me.addrow "" - for an empty row
next I

in the open event

then left/right clicking on cell should work

Author:  RicSum [ Wed May 15, 2013 8:45 am ]
Post subject:  Re: ListBox Editable???

That worked, but how are users supposed to add data if an empty listbox is not editable??
I cant have the listbox already containing data because it needs to be empty?

Thanks.

Author:  swineslife [ Wed May 15, 2013 8:49 am ]
Post subject:  Re: ListBox Editable???

just use

me.addrow ""

and all the necessary cells will have null or "" values so me.cell(0,0) will be ""

the rows must be added before they can become editable

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/