The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: JayPee on September 02, 2009, 11:06:18 AM

Title: Disable Scrollbars
Post by: JayPee on September 02, 2009, 11:06:18 AM
Hi All

Can someone tell me if it is possible to disable the vertical and horizontal scroll bars in a listbox, I don't want them to appear when data exceeds the width and height of the listbox

Thanks
Title: Re: Disable Scrollbars
Post by: Slugsnack on September 02, 2009, 01:08:05 PM
try EnableScrollBar()
Title: Re: Disable Scrollbars
Post by: JayPee on September 03, 2009, 07:12:53 AM
Hi

Thanks for the reply
Tried that- got rid or the arrows and thumb but the bars are still showing.

I want to stop them completely showing

Regards
John
Title: Re: Disable Scrollbars
Post by: sinsi on September 03, 2009, 07:24:55 AM
I can't see a way to hide the vertical scrollbar (that sort of defeats the purpose of a listbox), but the horizontal one:
Quote from: SDK
LB_SETHORIZONTALEXTENT Message

Sets the width, in pixels, by which a list box can be scrolled horizontally (the scrollable width). If the width of the list box is smaller than this value, the horizontal scroll bar horizontally scrolls items in the list box. If the width of the list box is equal to or greater than this value, the horizontal scroll bar is hidden.


Title: Re: Disable Scrollbars
Post by: Slugsnack on September 03, 2009, 08:46:09 AM
can i ask did you try ShowScrollBar() ?
Title: Re: Disable Scrollbars
Post by: JayPee on September 03, 2009, 08:47:36 AM
Thanks sinsi

I found the answer

I used  ShowScrollBar,hList,SB_BOTH,FALSE

Turns the scrollbars of completely

Works a treat

Thanks for the help

Regards
John
Title: Re: Disable Scrollbars
Post by: JayPee on September 03, 2009, 08:49:37 AM
Hi Slugsnack

I  just found that call in the SDK info
Now using it nad it works a treat

Thanks for your help

regards John