0 votes

Creating entries for an ItemList control. I cannot select the top entry with the mouse, but can scroll to it using the keyboard. Any thoughts out there? -Thank you


# loading designs into list
var selectionlist = ['']
if (result.size() > 0):
# loop for adding the shields to the item list control
for row in range(0, result.size()):
list.append(result[row]['designname']) selection_list.append('test1') selection_list.append('test2') selection_list.append('test3') selection_list.append('test4') selection_list.append('test5') selection_list.append('test6') selection_list.append('test7') selection_list.append('test8') selection_list.append('test9') selection_list.append('test10') selection_list.append('test11') # loading shield selection list for shield_id in range(selection_list.size()): select_shield_list.add_item(selection_list[shield_id],null,true)
Godot version v3.5.1.stable.official [6fed1ffa3]
in Engine by (100 points)

Hmmm... Cutting/pasting your code into a 3.5 project seems to work. Though, the first 2 records you show in the image must be coming from the for loop that precedes that block of static append calls. Since I don't have that data structure here, I just commented out that loop.

But, I can select all of the test* items using the mouse (or scroll to them via the keyboard). Bottom line, I don't see the problem here. Do you have the same issue if you comment out the for loop that (apparently) provides the initial 2 records?

Hmmmm, I put all 'test' entries in and blocked off the other additions. Still had problems mouse clicking on the top one, on the left side of the line. I say the 'left side' as I noticed that when I click on the far right of the desired line, no selection problems. I then thought that there might be a 'margin' problem, there were some weird numbers in the control (-8), but after I set them to zero, still have the selection issues. Weird that you are not having any issues. I am developing on a vanilla Ubuntu box, but don't see why that would cause issues. I have other controls (LineEdit boxes) that you can click on to enter data that work fine.

1 Answer

+1 vote
Best answer

Sounds a bit like there is a control node in front of it. You can change all controls mouse mode in the inspector. Control and container nodes by default block the mouse.

by (864 points)
selected by

I assume you mean by that to go to Control->Mouse->Filter and change that to ignore?

you were right! There was an overlapping boundary from another control that was overlaying the Itemlist control. I didn't see it as the 'visibility' was off by default. Thank you for your answer.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.