Large Number of dynamic controls hangs on Web 2.0

I am creating a line consisting of a label a textfield and 5 checkboxes. For ease of use for the user I am attempting to display 100+ of these rows in some instances and the program hangs.

I have addressed other issues with large times doing a single function by running a thread.

What is the best practice when the UI is involved?

First step is to get it to not hang, then I will worry about showing the user a progress bar or something so they don’t give up (they are willing to wait as long as they don’t think its hung)

For that many rows you might try a WebListboxCellRenderer so that WebListbox can optimize the dynamic loading and unloading of rows.

Thanks. I didn’t know you could do that on Web projects. Can you point me to an example where I can put a label textfield and 5 checkboxes on a single row? Or similar….

Honestly if you’re using the WebSDK, this shouldn’t be a problem anyway. Can you provide an example project?

Not using WebSDK. Perhaps I used the wrong terminology. Using Control Sets. Attached is a sample. I had to create 300 rows for it to hang. 200 succeeds. I’m guessing my full project is hanging around 100 because I have database calls and other logic.

checkboxtest.zip (9.8 KB)

Ok, well that doesn’t surprise me at all.

Now I’d be curious if it works at 255 and fails at 256 or 257.

No around 210. Didn’t spend the time to be exact.

Back to your original post, what is the best way to accomplish what I am trying to do. And with your response, please point me to an example that I can draw from.

Thank you!

IMHO, The easiest way to accomplish this is to use the callback control that’s included in the websdk examples for communication and then just render an html table with the controls you need in each row.

Beyond that, it would certainly be faster to create a websdk control, there are some other controls in the SDK examples folder to get you started, but I don’t have time to do it for you.

WebListBox received support for adding checkboxes in 2025r1, maybe you can use it for what you need. Please take a look at this blog post.

Here is a sample project using the built-in WebListBox checkboxes feature:

The sample project:

checkboxlistbox.xojo_binary_project.zip (8.5 KB)

4 Likes

A small textfield to contain a number is needed as well. Thanks for the idea, though.

WebListbox has editable cells now as well. Does that work?

1 Like

I think so. I’ll give it a try!

In that example, if you double click on the other cells, the text field will appear.

That’s perfect. Exactly what I was wanting. Thanks to all for the input, information and examples.

2 Likes

Here’s a repo that shows some of the techniques that I use for this…

1 Like

Definitely something to pursue!