Opened 8 months ago
Closed 7 months ago
#386 closed bug (fixed)
Selected items aren't shown in MUI 5.0-2017R4
Reported by: | jPV | Owned by: | Thore Böckelmann |
---|---|---|---|
Priority: | undecided | Milestone: | 5.0-2018R2 |
Component: | List.mui | Version: | 5.0-2017R4 |
Severity: | minor | Keywords: | |
Cc: | OS Platform: | undefined | |
Blocked By: | Blocking: | ||
Release Notes: |
Description
Summary
I got a report that my Hollywood program doesn't show the selected items in a listview. Items don't get highlighted if I select them programmatically, although they are in the selected state if I check them by the GetSelection method.
My OS4.1FE default MUI version does show them as expected, but the problem seems to be with newer MUI versions, 5.0-2017R4 in this case.
Steps to reproduce
- Try this example program: http://jpv.wmhost.com/testi/select/selectiontest (and have this in the same dir: http://jpv.wmhost.com/testi/select/muiroyale.hwp)
Expected results
You see two selected items in the list
Actual results
None of the items seem to get selected visibly
Attachments (2)
Change History (7)
comment:1 follow-up: 2 Changed 8 months ago by
comment:2 Changed 7 months ago by
Replying to Thore Böckelmann:
I run the demo like this
hollywood selectiontestBut all I get is an error requester telling me about a general syntax error in line 1.
"selectiontest" is a compiled executable (OS4 binary), not an applet. So don't run it with Hollywood, just launch it like any other program.
comment:3 Changed 7 months ago by
Milestone: | future release → 5.0-2018R2 |
---|---|
Owner: | set to Thore Böckelmann |
Status: | new → assigned |
Hm, strange. The modified DragnDrop demo definitely selects the desired entries visibly, while your demo does not. Although both demos produce the same debug output during the artificial selection for me.
I'll have to investigate a bit further.
comment:4 Changed 7 months ago by
Ok. Is it possible you are trying to do multiselection on a list which does not have multiselection enabled? That is the only explanation.
MUI's list item background selection works like this:
multiselection enable & selected item → selected background
active item → active background
otherwise → normal background
Since you do a selection on a non-multiselection list the first two tests will always fails and only the last resort "normal background" will be applied.
I must admit that List class is very inconsistent here. A non-multiselection list must not have more than one single selected entry, but the current implementation allows this, although it is not documented.
I will change List class' behaviour accordingly to act consistently for non-multiselection lists.
I run the demo like this
But all I get is an error requester telling me about a general syntax error in line 1.
But to demonstrate that selecting items from code is definitely working I modified the DragnDrop demo a bit. Find the AmigaOS3 binary plus the source attached here.