Updated method for refreshing WebListBox

In my app, I have a WebListBox which shows accounts and descriptions. To edit an item in the list, I click a button and a WebDialogBox opens which is populated with the proper data. But when I change the data and update the database (MySQL) the WebListBox showing the selected account/line is not refreshed.

I have looked through comments here and found discussions from a couple years ago but they do not seem to be updated as some of the properties are no longer available…like listbox.Cell(,) for example.

You can probably envision what I am trying to do. It’s pretty basic. I am thinking that someone has accomplished this already so, any help would be greatly appreciated!

Oh, you can probably guess… adding and deleting accounts is next on my to-do list so any thoughts on making WebListBox lines appear and disappear would be great!

Thanks!

Paul

(Xojo 2023r2 - Win 11)

Are you saying that updating the WebListbox cell is not displaying or are you expecting it to automatically update? The later does not happen, you must update the cell yourself.

I am trying to update the WebListBox cells myself but, they are not refreshing. I have the current row index stored (currow) and that seems to be accurate.

This is what I am executing in code:

WebPage11.ListBox1.CellTextAt(currow,2) = TextField2.Text

No error, just not updating/refreshing in the list.

Thanks for clarifying. That sounds like a bug, but I am not seeing the behavior you describe using a simple project: Test Project

Yeah… it should be that simple. Let me marinade on this for just a bit.

Thanks, Tim! :slight_smile:

Hey TIm,

Here was my problem. I was pulling initial values from the database rowset, showing the edit screen, replacing the database values with what was on screen and updating the weblistbox with the rowset value again … well, you know that just isn’t going to work. :smile:

Thanks again! The example you provided was clear and helpful. :slight_smile: