9/9/2023 0 Comments Xojo weblistbox listindex![]() You can put the ListBox into multiple-row selection mode by changing. ![]() For example, if rows 1, 3, and 4 are selected, ListIndex returns 1. then the number of the lowest selected row is returned. Please use ListBox.SelectedRowIndex as a replacement. If you expand a folder, add the children for that expansion, and then collapse the row, the listbox’s LastIndex does not decrement to the collapsed row count. This item was deprecated in version 2019r2. I just discovered the cause of an odd bug on many of my apps that I’m building under 18r1.1. So, can I not change the listIndex from within cellAction? Do I have to resort to something stupid like a timer to wait for cellAction to finish before I can change the listIndex? Is this actually a bug? I have a sample project and am happy to submit a bug report, but would rather not clutter up feedback with something that is by design. ListBox.ListIndex From Xojo Documentation. But the call to listIndex does not seem to have had any effect, so here’s what the list now looks like:Īda <- This should be the selected row, but it is not. I ALSO want it to delete the corresponding row in the database table. I also have a Delete Name button that currently deletes the name entry from the listbox. Here’s there my problem lies: I’d like to KEEP the user’s selection on the thing they just edited… so after re-loading the list I loop through it looking for the thing they just updated (“Ada” in this case) and then set me.listIndex = index of the “Ada” item. Using a button Add Name, I am adding a name to a listbox while also adding it to a table in a database. I should mention that I cannot simply use the sort methods of the listBox because this is a hierarchical listbox, and the item that was edited may be the child of some higher level item, and I need each child list sorted alphabetically as well as the parents. The user then types in “Ada” and presses enter.Īt this point, the cellAction event is fired, which in my app’s instance will update the item in the database to be Ada instead of Foo, it then clears out everything in the list and reloads it all so things are again in the correct order. To do this, they double click on the Foo cell which has 2 effects: it selects that row in the listbox, then makes that row become an edit field with “Foo” in it and selected. Now, assume the user wants to change “Foo” to be “Ada”. Note that they are alphabetical - my list needs to stay sorted in alphabetical order. Let’s say my list box contains this list: delete maybe Removing a row in a listbox - Xojo Programming Forum Web5 de. To do this, I’ve set the cellType property to be TypeEditableTextField for the cells I care about. RemoveItem ( Index) expression A variable that represents a ListBox object. I’m using a listbox that allows the user to make changes to the contents of the listbox by editing things in-place. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |