December 06, 2022, 10:57:43 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Scrollbar Thumb size

Started by ckoehn, March 08, 2010, 03:05:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ckoehn

March 08, 2010, 03:05:34 PM Last Edit: March 08, 2010, 04:31:06 PM by ckoehn
Is there a way to set the thumb size of a scrollbar?  I have a scrollbar control which has a small height and the button takes up almost the whole distance.  See image below.

I found that you could send it a message SB_SETTHUMBSIZE but couldn't find any value or how to do it.  I do know it is possible because listboxes and editboxes thumbs change size depending on how many lines there are.

Thanks,
Clint

ckoehn

Mucked around the net and msdn site enough to finally figure it out.   ;D

SCROLLINFO scrInfo

scrInfo.cbSize=LEN(scrInfo)
scrInfo.nPage=3
scrInfo.nMin=0
scrInfo.nMax=maxCount
scrInfo.fMask=SIF_PAGE
SetScrollInfo(GETCONTROLHANDLE(win,VScrollbarID),SB_CTL,scrInfo,TRUE)

Later,
Clint