PDA

View Full Version : How to turn off scroll bar??



Mark Powers
6-Jan-2012, 11:13 AM
Have the cImageCtonainer working pretty nicely. What I would like to do is turn the scroll bars off if possible - I'm using VDF 16.0. Here is what it looks like with scroll bar:

4798

If I can turn the scroll bar off it will allow for a little more room for the image to be viewed.

Thanks
:oMark

Vincent Oorsprong
7-Jan-2012, 05:32 AM
Mark,

Look at your peImageStyle setting. If the setting is not ifOriginal there is a big chance that scroll-bars are created.

Not tested: You could try to set the WS_HSCROLL and/or WS_VSCROLL window styles to false. They are automatically set to true by default.

Mark Powers
10-Jan-2012, 10:41 AM
Thanks Vincent. Used the WS-HSCROOL & WS_VSCROLL and that did the trick. Using the peimagestyle set to iforiginal didn't give enough display of the image, while iffitbothsides give all the images - our images are pretty center and very standard so it is technically just cutting out a little white space. Looks good - thanks!

Boris
26-Apr-2012, 10:44 AM
Hi! Mark, I have the exact same problem. I have added:



Set Window_Style WS_VSCROLL to False
Set Window_Style WS_HSCROLL to False


and it still displays that vertical scrollbar. How did you managed to turn it off?

Thanks in Advanced.

Mark Powers
26-Apr-2012, 11:17 AM
Boris - I finally just made the container big enough to hold the entire image. But I'll try this.
Thanks

philby
4-Dec-2012, 10:28 PM
Vincent,
I also need to turn off the scroll-bars. They do not seem to behave well. When I display an image that does not fit, the scroll bar/s display, but if I then display another image that does fit, or set the image to "", the scroll bars from the previous image still hang around. I tried the code exactly as per Boris's example, but the scroll bars persisted. I am not in a position to make all the images the same size, and would prefer just to have no scroll bars at all. The utility I am developing is for internal use only, so it does not matter that in some situations I will not be able to see the whole image.
Regards, Phil

Vincent Oorsprong
5-Dec-2012, 03:25 AM
Phil,

If you don't want scrollbars there are two options:
1. Set the peImageStyle to ifFitOneSide
2. Turn off the scrollbars via the window style

Turning off the scrollbars in total (I will send you a test package) also removes the mouse drag feature that is normally available.

Mark Powers
5-Dec-2012, 12:11 PM
Vincent - I would also like to try the test package?
Mark

Vincent Oorsprong
5-Dec-2012, 12:26 PM
Mark,

I would like to release a new version any of the coming days. Phil already confirmed it worked. Downside of turning off the scroll-bars is that you cannot move the image with the mouse anymore and the mouse scroll-wheel also stops working. You better set the peImageStyle to ifFitOneSide.

Bob Worsley
22-Jun-2017, 08:22 PM
Here it is over 5 years later and I'm having the same problem. I tried both methods in the cImageContainer class and can't seem to get rid of the pesky scrollbars. cImageContainer.pkg has settings for WS_VSCROLL & WS_HSCROLL at the top and changing them makes no difference. Changing ppeImageStyle to ifFitOneSide also made no difference.

Did that test package work and if so is it still available?

Any other ideas other than make the image size smaller?

Vincent Oorsprong
23-Jun-2017, 01:54 AM
Bob,

You can rid of the scrollbars by setting the property pbShowScrollBars to false. You can see the result in the ImageGallery demo application as it contains a checkbox to turn them on or off.

Bob Worsley
23-Jun-2017, 07:07 AM
Thanks Vincent, I'll look for that. This project was done back when the graphics library was first released so it will probably have to be updated to include that functionality.

Vincent Oorsprong
23-Jun-2017, 09:03 AM
Bob,

Do that.

And don't hold your breath but we are working on a new version to be released after v19.0 comes out. Lots of changes and additions but currently mainly waiting for documentation to be done.

Bob Worsley
23-Jun-2017, 09:36 AM
Any chance of being able to show PDFs? A long shot I'm sure... ;)

Bob Worsley
23-Jun-2017, 09:05 PM
Worked nicely