A couple of comments:
1.) This might be titled the “NUG” but did the N stand for New or Network? It certainly doesn’t stand for New now if it did at one point. There hasn’t been a new user on this list for years since the revamped Xojo forums came about. I don’t even know if you can sign up for this list any more.
2.) I think you might have been too sleepy last night when working on this. As Markus pointed out, the documentation for ColumnType states:
ListBox.ColumnType
Property (As Integer)
aListBox.ColumnType( columnNumber as Integer ) = newIntegerValue
or
IntegerValue = aListBox.ColumnType(columnNumber as Integer)
Sets the type for the passed column. The first column is numbered zero.
So wait a minute - where did you possibly ever think that aListBox.ColumnType( columnNumber as Integer) = newIntegerValue could possibly mean that you attempt to pass the type of column in the parenthesis??? What part of “columnNumber” is not understood? I’m sorry that you have spent hours and hours reading the documentation but if you know Xojo at all you would know the general flow of the language and what things mean in the language reference.
I don’t have anyone in my area to sit down with and talk about Xojo either (actually, there are some users not too far away but I’ve only met a few once thanks to Christian Schmitz coming into town - but that was just once). So I taught myself Xojo by examining and running the examples included with Xojo and reading the user guide and all. One must carefully read the user guide - it’s pretty good. And no one is trying to diss you but when someone comes into a forum or mailing list and is saying things that would appear to indicate they have not read the documentation (which I believe was a valid assumption based on the scope of your question), yeah, people are going to question it and suggest you read it.
Now, when you create a listbox, you specify the number of columns. The first column is column 0. The last column is column number n-1 where n is the number of columns. You can set the column type all you want but until you add any rows, you will have an empty listbox. You can check if you have an empty listbox by accessing the ListCount property. If that number is 0 that means you have nothing there. You can also know what the last row is that you have worked on by accessing the LastIndex property. If you have not edited or selected any rows, that property will be -1.
Now to add a row, you call the AddRow method.
myListbox.AddRow
or with a 1 column listbox such as you have,
myListbox.AddRow(“This is the new content”)
In the second example, “This is the new content” will be the content of the row.
Now to edit any cell that exists you call:
myListbox.editcell(row,column)
You may wish to put that command in the cell click event of the listbox. So when a user clicks in a cell, then it becomes editable. So as the Language Reference states you can do something like this in the CellClick event:
me.CellType(row,column) = Listbox.TypeEditable
me.EditCell(row,column)
Lastly, while the CellType and ColumnType properties of the listbox are integer, I encourage you to use the built in Xojo constants (i.e.: Listbox.TypeEditable, etc) as opposed to their integer values. It will make your code much more readable.
I encourage you to spend time with the example listbox projects included in Xojo. Don’t just read the examples. Open the example projects and play with the code. Modify things. See what doing that does, etc. Listboxes are extremely powerful but they are not WYSIWYG and they do require a lot of work.
Jon
Post by SH DevelopmentYou know, I literally spent all night reading the documentation about listboxes. I then spent hours poring over examples of listboxes. Then I spent another couple of hours trying different approaches. And then, as my last resort, I contacted this list.
Just because there is documentation, and just because there are examples, does not mean there is understanding. Maybe it’s because I was up late, maybe I was just frustrated, maybe I’m not as young as I used to be.
I don’t have anyone in my area (that I know of) where I can sit down and just shoot the shit about Xojo. Most of my friends can’t even pronounce “Xojo”. This list is my community, and a little encouragement would go a long way instead of snide remarks and criticism. Sometimes it just takes a different perspective or someone explaining it a different way. Not everyone learns the same.
End of rant. I’m going back to my listboxes.
Jeff
Post by Jon OgdenPlease examine the examples too. You need to add rows to your list box using the AddRow method in order to be able to edit the cells.
Listboxes take a lot of work. So spend lots of time looking at the examples.
Sent from my iPhone
Post by SH DevelopmentI have been through the documentation, thank you. Sorry for being a newbie.
Jeff
Post by Markus WinterPost by SH DevelopmentStill not seeing it. I thought (3) was the column type constant? At least that what is says under Listbox.ColumnType.
me.ColumnType(0)=me.TypeEditableTextArea
Then where do you think you specified which column you mean?
3 and 0 are the index number of the column.
Please do yourself a favour and work your way through the free documentation. You will make much better progress than with a trial and error approach.
_______________________________________________
https://forum.xojo.com/
_______________________________________________
https://forum.xojo.com/
_______________________________________________
https://forum.xojo.com/
_______________________________________________
https://forum.xojo.com/
_______________________________________________
Xojo forum:
htt