Delphi. Firemonkey. TListbox. Is scrollbar visible?


I want resize my form height by ListBox items count – increase height while scrollbar visible.
How to know, is scrollbar visible or nor in TListbox?
So, there are a tons of information for VCL (based on Handle) but not for FMX.
Lazy method:

ListBox1.Items.Count * Round(ListBox1.ItemByIndex(0).Height)

This method not working properly because form border and caption can be different on different machines.

Comments are closed.