TListView under GTK2 does not issue OnSelect correctly
Original Reporter info from Mantis: mike.cornflake
-
Reporter name: Mike Thompson
Original Reporter info from Mantis: mike.cornflake
- Reporter name: Mike Thompson
Description:
Issue 1:
Expected behaviour: Use mouse to change selection in TListView, two OnSelects should be called - first to report the unselection the previous TListItem, the second to report the new selection. (Note: first call will not occur if no selection previously exists).
Actual behaviour: Under GTK2, multiple OnSelects are called (additional 1 call if mouse used, additional 2 calls if keyboard used to change selection). The number of additional calls increases if between Mouse/Keyboard operations the TListView.Selected was changed in in code.
Issue 2:
Expected behaviour: When TlistView.Selected is programmatically changed, two OnSelects should fire - one to report the unselection of the first item. The second to report the selection of the new item.
Actual behaviour: No OnSelect is fired when TListView.Selected is changed in code.
Additional information:
Reproduces under Lazarus 0.9.30, FPC 2.4.2, SVN 29900M, GTK2 widget set, Ubuntu 11.04 64bit
Does not reproduce under Lazarus 0.9.29, FPC 2.4.0, Win32 widget set, Windows XP 32 bit - everything behaves here as expected.
Not tried under different environments.
TListView set up with Report style and two columns. Haven't tried with different TListView configurations.
Attached project reports whenever OnSelect is called, and allows for TListView.Selected to be changed in code by clicking btnNext.
Mantis conversion info:
- Mantis ID: 19806
- Version: 0.9.30