TListBox SelectAll not working in Linux but works in Windows lazarus / 31-LCL ---------------------------------------------------------------------- har0ld · 2018-09-06 20:24 Good day everyone. It's my first time to post. I have used Pascal in the past but had to switch to .Net and now switching back to Free Pascal for cross-platform development. As the title says there might be a bug in TListBox component. I have attached a simple example to demonstrate the bug. The same code is working under Windows but not in Linux. I am using the latest version FPC 3.0.4 and Lazarus 1.8.4 ---------------------------------------------------------------------- sash · 2018-09-06 20:42 Tried your example. Works Ok if Multiselect = true (what was initially false in your project). ---------------------------------------------------------------------- har0ld · 2018-09-06 21:32 Thank you very much Sash for pointing that one out, I missed that. Next if I assign a Context Popup menu to do the Select All sometimes it works and sometimes it does not if I set the Handled=true in the ListBox1ContextPopup event. I wanted to not to show the Context PopupMenu when the list is empty by counting the number of items in the ListBox and setting the Handled to true when the list is empty. ---------------------------------------------------------------------- howardpc · 2018-09-06 22:09 What you want is better done using Actions. Rather than not show a popup menu at all in some circumstance and showing it in another state (considered bad GUI form) it is better to keep the popup menu, and disable the appropriate item. See attached project ---------------------------------------------------------------------- har0ld · 2018-09-06 22:49 Quote from: howardpc on September 07, 2018, 12:09:16 amWhat you want is better done using Actions. Rather than not show a popup menu at all in some circumstance and showing it in another state (considered bad GUI form) it is better to keep the popup menu, and disable the appropriate item. See attached project Thank you very much Howardpc. That partially solved the issue. I found that if there is at least one selection already made, the SelectAll does not work anymore (at least in Linux).