Custom Scrollbars for Text Field

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
andyt
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 15
Joined: Mon Mar 08, 2010 10:41 am

Custom Scrollbars for Text Field

Post by andyt » Wed Feb 28, 2018 4:19 pm

Is there a way to replace the scrollbars associated with a text field with custom (skinned) scrollbars? My guess is that you have to create custom sliders and somehow link these to a text field set not to display its own scrollbars.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Custom Scrollbars for Text Field

Post by bogs » Wed Feb 28, 2018 4:43 pm

This lesson is explicitly about what your asking.
Image

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9824
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Custom Scrollbars for Text Field

Post by FourthWorld » Wed Feb 28, 2018 5:13 pm

I would think very carefully before replacing something as common as a scrollbar with a novel implementation.

The work is merely tedious, but not difficult. Bogs' link is good there.

The bigger question is about user expectation: scrollbars are so common throughout an OS that users never think about them at all. That's ideal, it saves their little grey cells for the things that matter most, their own work within your app.

Once we deliver unusual replacements for common elements, it raises the cognitive load, however slightly. It requires a momentary, if unconscious, need to think about the control and how to interact with it.

If the interaction mirrors built-in controls perfectly, the behavior is easily learned. But even the slight learning requirement is wetware cycles taken away from the workflow.

All that said, there are times when an app's workflow is simple, and based more on graphical appeal than productivity features, so that introducing novel implementations of otherwise-standard controls may not be bad at all.

I merely suggesting thinking it over before committing. If nothing else, if you're looking for an excuse to be lazy and put more time into your app's features and less into reinventing standard controls, now you have the rationale you were looking for. ;)
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Custom Scrollbars for Text Field

Post by bogs » Wed Feb 28, 2018 6:02 pm

Granted everything said above, I think it is always a good idea to expand your knowledge of how things work, or can be made to work :D
Image

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Custom Scrollbars for Text Field

Post by dunbarx » Wed Feb 28, 2018 6:26 pm

Richard.

"Wetware"?

What have we come to? One day a robot will sneer at us "wets".

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9824
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Custom Scrollbars for Text Field

Post by FourthWorld » Wed Feb 28, 2018 6:28 pm

bogs wrote:
Wed Feb 28, 2018 6:02 pm
Granted everything said above, I think it is always a good idea to expand your knowledge of how things work, or can be made to work :D
Learning is good. Making users delighted is good. Sometimes they happen together. :)
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Custom Scrollbars for Text Field

Post by bogs » Wed Feb 28, 2018 8:15 pm

FourthWorld wrote:
Wed Feb 28, 2018 6:28 pm
bogs wrote:
Wed Feb 28, 2018 6:02 pm
Granted everything said above, I think it is always a good idea to expand your knowledge of how things work, or can be made to work :D
Learning is good. Making users delighted is good. Sometimes they happen together. :)
This is why ALL of my scrollbars from now on will be in the image of minions running across the screen! DO MY BIDDING!!
Image
dunbarx wrote:
Wed Feb 28, 2018 6:26 pm
"Wetware"?
Isn't that when someone turns the hose on you, and your still fully dressed? :wink:
Last edited by bogs on Wed Feb 28, 2018 8:19 pm, edited 1 time in total.
Image

andyt
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 15
Joined: Mon Mar 08, 2010 10:41 am

Re: Custom Scrollbars for Text Field

Post by andyt » Wed Feb 28, 2018 8:19 pm

bogs wrote:
Wed Feb 28, 2018 4:43 pm
This lesson is explicitly about what your asking.
Thanks bogs. I've already taken a look at this tutorial but the download code just doesn't appear to work. Using the latest version of Livecode 8 any kind of interaction with the scrollbar throws up a show-stopping error.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Custom Scrollbars for Text Field

Post by bogs » Wed Feb 28, 2018 8:20 pm

My apologies andyt, I don't often find myself in the newer IDEs, and so haven't tested the code against it. What is the error you are seeing?

*Edit - never mind, I downloaded the example and am looking at it. Apparently it throws a 'divide by zero' error at line 301.

While I was able to fix that error, apparently other ...eccentric behaviors happen when testing the example in the newest Lc IDEs. I find this peculiar to say the least. May be time to weed through some of these lessons, or at the very least mark the versions of Lc they run with.

I would not have thought more than a minor correction needed to update it.
Image

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9824
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Custom Scrollbars for Text Field

Post by FourthWorld » Wed Feb 28, 2018 9:32 pm

bogs wrote:
Wed Feb 28, 2018 8:20 pm
May be time to weed through some of these lessons, or at the very least mark the versions of Lc they run with.
That would be awesome. We need more eyeballs on those to be sure. Are those included with the docs at Github?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Custom Scrollbars for Text Field

Post by bogs » Wed Feb 28, 2018 9:43 pm

That I could not say, having never been there myself :?:
Image

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”