There are two widths: HorizontalScrollView.Width and HorizontalScrollView.Panel.Width
HorizontalScrollView.Width is the width visible on the device.
HorizontalScrollView.Panel.Width is the width of the inner Panel. You scroll it horizontally to show the hidden pasts.
These can be set in the Designer:
Width = HorizontalScrollView.Width
InnerWidth = HorizontalScrollView.Panel.Width
When you fill a HorizontalScrollView in the code you need to set HorizontalScrollView.Panel.Width to the needed value.
The principle is the same with the vertical ScrollView.