Nativve scroller scroll down as text input

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
Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Nativve scroller scroll down as text input

Post by Jellobus » Tue Apr 08, 2014 9:44 am

Hi, :D

I made a field with a scroller scrolling down as text input. so the users don't have to manually scroll down to see the next line below visible area of the field.
The height of field "content" is 100. if the text reaches beyond 100 (height) of field, scroll sets down to the formattedHeight of field to show new line.

The problem is the scroller does not adopt increased height of the field..I put the script in the field like..

Code: Select all

--#1create scroller first( mobileControlCreate "scroller", "GroupScroll")

on keyUp
   if 100 < the formattedheight of field "content" then
     set the vScroll of group "scrollarea" to the formattedheight of field "content"
   end if
end keyUp
The thing is, after put texts over the height 100 of field, I can not scroll up to the top of the field fully . It seems that the scroller does not adopt increased height of the field yet the field just shows the last line(newly created line) as I put text into the field.
Is there any way to solve this issue??

Cheers,

Louis
Last edited by Jellobus on Wed Apr 09, 2014 9:38 am, edited 1 time in total.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: scroller scroll down as text input

Post by Simon » Tue Apr 08, 2014 8:33 pm

Hi Louis,
Not sure how to solve the problem you built for yourself but;

Code: Select all

on textFieldChange
   set the vscroll of me to 10000
end textFieldChange
That in the field script is working.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: scroller scroll down as text input

Post by Jellobus » Wed Apr 09, 2014 3:21 am

Hi Simon,

Yes your suggestion is equally working but the real problem is users can't scroll back to the first line of field after putting a lot of lines(& scroll bottom of fld )..There must be way to solve this issue..

Cheers,

Louis

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: scroller scroll down as text input

Post by Simon » Wed Apr 09, 2014 3:40 am

Hi Louis,
Not sure I follow?
Hitting the up arrow scrolls to the top just fine.
How did you want to scroll back to the top?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: scroller scroll down as text input

Post by Jellobus » Wed Apr 09, 2014 7:21 am

Hi Simon,

Oh I think we were taking different things :) I was talking about the native scroller. There is no arrows because it is not the built in scroller in the field.
Is it possible to have same effect with built in scroller just like a native scroller of device?
I wonder how other developers could achieve creating text field enables swipe up and down with touches...

Louis

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: scroller scroll down as text input

Post by Simon » Wed Apr 09, 2014 7:30 am

Hi Louis,
Ahh native scroller, didn't say that before.
Will have to work on this a bit more.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Nativve scroller scroll down as text input

Post by Simon » Thu Apr 10, 2014 5:58 am

Hi Louis,
If you use a native multiline text entry field it works the way you want.

Code: Select all

mobileControlCreate "multiline", "myTextFld"
mobileControlSet "myTextFld", "visible", true
mobileControlSet "myTextFld", "rect", "50,50,200,200"
No other code needed.

Must it be just a native scroller?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: Nativve scroller scroll down as text input

Post by Jellobus » Thu Apr 10, 2014 10:51 am

Hi Simon,

Thanks for your suggestion. I tried it before I decide to use only LC field. unfortunately I found some problem that I couldn't manage..

The screen partially darkens as I select text of native multiline & touch buttons appears at the top.
The screen blackens out partially yet hidden buttons(in blackend part) are still working fine.

I attached picture showing how this problem look like. Please see it and let me know if you know any solution for it.

Thanks in advance,

Louis
Attachments
NativeMultilineIssue1.png

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Nativve scroller scroll down as text input

Post by Simon » Thu Apr 10, 2014 11:00 am

Sorry that is a different problem not part of your original post.
The native text field does work as you wanted?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: Nativve scroller scroll down as text input

Post by Jellobus » Thu Apr 10, 2014 1:34 pm

Hi Simon,

Native field works perfectly but it can not be used due to the darkening issue(see picture above). Have you heard of this issue? It could be a bug..If this can be fixed, I definitely will use a native text field.

Cheers,

Louis

Post Reply