Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | grymjack |
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 selection_list = ['']
if (result.size() > 0):
# loop for adding the shields to the item list control
for row in range(0, result.size()):
selection_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)
```
[wrap=comment]
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?
[wrap=footnote]jgodfrey | 2022-10-28 22:57[/wrap]
[/wrap]
[wrap=comment]
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.
[wrap=footnote]grymjack | 2022-10-29 06:29[/wrap]
[/wrap]