[Lazarus] How to query vertical scrollbar width?

Graeme Geldenhuys graemeg at opensoft.homeip.net
Wed Aug 19 11:29:46 CEST 2009


Vincent Snijders wrote:
> 
> I would try:
> http://lazarus-ccr.sourceforge.net/docs/lcl/lclintf/getsystemmetrics.html
> 


Thanks Vincent, that got me 80% there... :-)

Unfortunately my problems tend to me more difficult than normal. Under 
GTK (I don't know about other GUI toolkits or other themes), the 
scrollbar can sometimes be outside the component. See attached 
screenshot, where I am using the popular GTK ClearLooks theme.

The call:  GetSystemMetrics(SM_CXVSCROLL);  does indeed return the width 
of a Vertical Scrollbar - in my case it is 15 pixels. But what about the 
small gap between the StringGrid and the Vertical Scrollbar?  How do I 
get that value?


Regards,
   - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: system_metrics.png
Type: image/png
Size: 2058 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20090819/25633c1f/attachment-0004.png>


More information about the Lazarus mailing list