retain mouseScroll in field when hiding scrollbar
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
retain mouseScroll in field when hiding scrollbar
Hi
Is there a way to keep the mouse scroll functionality in a field when you hide the scrollbar?
As soon as you untick the vertical scrollbar scrolling does not work anymore.
Sjat
Is there a way to keep the mouse scroll functionality in a field when you hide the scrollbar?
As soon as you untick the vertical scrollbar scrolling does not work anymore.
Sjat
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: retain mouseScroll in field when hiding scrollbar
Hi Sjat,
Do you mean mouse wheel ?
If yes, I tested it with rawkeydown message and it works for me "LC 7.0.5).
Best regards
Jean-Marc
Do you mean mouse wheel ?
If yes, I tested it with rawkeydown message and it works for me "LC 7.0.5).
Best regards
Jean-Marc
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 9664
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: retain mouseScroll in field when hiding scrollbar
Hmmm.
If you click and hold the mouse in a field, and drag above the top or below the bottom, the field will scroll its contents. Of course, you are selecting that block of text as you do so.
I am sure that a kluge using the "mouseMove" message can be worked out. Can you say why you need this, or how you really need it to work?
Craig Newman
If you click and hold the mouse in a field, and drag above the top or below the bottom, the field will scroll its contents. Of course, you are selecting that block of text as you do so.
I am sure that a kluge using the "mouseMove" message can be worked out. Can you say why you need this, or how you really need it to work?
Craig Newman
Re: retain mouseScroll in field when hiding scrollbar
Hi
Thanks Jean-Marc.
Yes, rawkey 65308 and 65309 is the mouse wheel. Easy to to just add or subtract 1 to/from scroll.
Put this handler in the field that needs to be scrolled. Adjust the 10 to whatever value to change the speed.
Craig
I just need the mouse wheel to be able to scroll the text without showing the scrollbar. It´s a text-centric game and I don´t want the scrollbar for aesthetic reasons.
But I understand by the answers that I have to kluge this. It´s just irritating that when you try to customize the look of a field you loose the built-in functions.
thanks
Thanks Jean-Marc.
Yes, rawkey 65308 and 65309 is the mouse wheel. Easy to to just add or subtract 1 to/from scroll.
Put this handler in the field that needs to be scrolled. Adjust the 10 to whatever value to change the speed.
Code: Select all
on rawkeydown theKey
if theKey=65308 then set the vScroll of me to the vScroll of me-10
if theKey=65309 then set the vScroll of me to the vScroll of me+10
pass rawkeyDown
end rawkeydown
I just need the mouse wheel to be able to scroll the text without showing the scrollbar. It´s a text-centric game and I don´t want the scrollbar for aesthetic reasons.
But I understand by the answers that I have to kluge this. It´s just irritating that when you try to customize the look of a field you loose the built-in functions.
thanks
Last edited by Sjatplat on Sat Oct 24, 2015 7:33 pm, edited 5 times in total.
-
- VIP Livecode Opensource Backer
- Posts: 4002
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: retain mouseScroll in field when hiding scrollbar
Hi Sjat,
try to set the scrollbarWidth to 0
That way the field behaves as if it had a scrollbar but does not show it.
Kind regards
Bernd
try to set the scrollbarWidth to 0
That way the field behaves as if it had a scrollbar but does not show it.
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: retain mouseScroll in field when hiding scrollbar
Hi Sjat,
I see that the vScroll works fine without scrollbar (LC 7.0.5).
Which version do you use ?
Jean-Marc
I see that the vScroll works fine without scrollbar (LC 7.0.5).
Which version do you use ?
Jean-Marc
https://alternatic.ch
Re: retain mouseScroll in field when hiding scrollbar
Thanks Bernd. Very nice.
Jean-Marc:
I´m using 8 dp 7.
I tried 7.1.0. Same problem there. Also in 5.5.
Sjat
Jean-Marc:
I´m using 8 dp 7.
I tried 7.1.0. Same problem there. Also in 5.5.
Sjat