Web control differences

It’s some time since I did anything with Xojo. A hardware change has forced me to update a web application developed with Xojo 2020r2.1 Pro/Web Edition and it’s raised a couple questions about the behaviour of the web controls.

After filling a WebListBox with rows I set the SelectedRowIndex but the row is not highlighted. Is this normal behaviour for the WebListBox?

After populating a WebTextArea with text I would like to select and highlight some of the text found with a RegEx search. I can’t find any way to set a selection other than SelectAll. Is this a limitation of the WebTextArea.

Appreciate any insight.

No, setting SelectedRowIndex should work. Can you provide an example project where it is not?

2 Likes

Thanks for the conformation Tim.

What I’m working on is not really suitable to post.

I’ll knock up something simple and see if I get the same behaviour.

Yes, please try to simplify the problem into a new example project. Sometimes this process helps you identify the problem, but it’s also the best way to show us exactly how things are implemented.

Issue can be reproduced with a WebListBox and a Button in a newly created WebProject.

Compiled on a 27” 2020 iMac, Sequoia (15.6.1)
Tested with Firefox and Chrome

//button pressed event
// when the button is pressed immediately after the page is shown
// setting selectedRowIndex does not highlight the selected row

// the row is highlighted when the button is pressed a second time

for iRow as Integer = 1 to 10
  ListBox1.AddRow iRow.ToString
next

Listbox1.SelectedRowIndex = 3

I can’t reproduce that behavior here with the steps described.
working.xojo_xml_project (4.4 KB)

Just to confirm, what Xojo version are you using? 2020r2.1, 2025r2.1 or other?
Sorry if I missed this info.

1 Like

Hi Alberto

…developed with Xojo 2020r2.1 Pro / Web Edition…

I’m using the same Xojo 2020r2.1 licence to carry out the update.

I just tried the project file Tim posted, which is from a later version of Xojo, and it crashes immediately when I try to run it in the IDE.

I’m putting the inconsistent behaviour down to a bug in my earlier version of Web Edition (it has a few), The bug is not crucial to the app and Xojo won’t fix it out of support so I’m moving on.

Thanks for reading and especially to Tim for confirming I can stop debugging my code attempting to fix it.