GUIScrollView: How to set the size of the "client rect"?

I'm currently doing the following:

` scrollPosition = GUI.BeginScrollView( new Rect(0,0,25,100), scrollPosition, new Rect(0,0,100,100) ); GUI.EndScrollView(); `

As you can see, the height of the scroll view is the same as the view rect. In my mind, this should not generate a vertical scroll bar. However, because the horizontal scroll bar is generated (it takes up vertical space), it then results in the vertical scroll bar appearing. Hence, I need a way to get the height of the horizontal scroll bar so I can add it onto the height of the scroll view to compensate. In Windows lingo, this would be the same as setting the "client rect" size of the scroll view. Is there any way of doing this?

I encountered exactly this issue, and I kind of agree with Cyclops (hard-coding values is not great but in this case I would), though I would make a public member variable so the designer can tweak those Rects and the spacing later if the skin/style changes.

Also you can get the height of the Horizontal Scroll Bar style (e.g. skin.GetStyle("horizontalscrollbar").fixedHeight), though with padding/margins that could probably be changed.

I think the viewRect is basically a "client rect". Personally, I would just subtract 20 from the viewRect height, and call it a day :) I realize hard-coding numbers is frowned upon, but how many times is a scrollbar's dimensions likely to change? (Okay, maybe 20 isn't right, play around with it).