Hilite Property and Native Scroller

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

Hilite Property and Native Scroller

Post by Jellobus » Wed Apr 09, 2014 9:29 am

Hi, :shock:

I am working with a native scroller and a text field. there are many things to fix but I like to ask one of problems with a native scroller here.

The scroller set by mobileControlCreate "scroller"
The text of field is can be focused and modified. AND it can scroll down and up by swiping screen of device.

The problem is that the field is kept hilited and interfering scrolling motion. What I tried is change hilited color to the color of background so that hilited behavior can be hid but I didn't like it. the scrolling is still sluggish with this fake trick..

Is there any good way to disable or bypass hilite of field?


Thank you very much in advance!


Louis

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Hilite Property and Native Scroller

Post by jmburnod » Wed Apr 09, 2014 9:46 am

Hi Louis
You can solve this with a quick but dirty way :oops: like this:
In your group you create a graphic "ForFinger" (or what you want) with the same height and
a width that you decide for your field and set the topright of this grc to the topright of the group.

Best regards
Jean-Marc
https://alternatic.ch

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

Re: Hilite Property and Native Scroller

Post by Jellobus » Thu Apr 10, 2014 5:08 am

Hi Jean :D

I tried this but I am not sure I really understand it.. I covered up the field with graphic then set the opaque to true & set the blend level to 100 in order to be invisible.

the result
--Hilite is blocked.
--Text can be added

Problem
--I can type text into field but can't put the insertion point to the desired location in the field.

Do I need further work to make it focusable on the desired location?

Hope there is another dirty way to make it possible :mrgreen:

Louis

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Hilite Property and Native Scroller

Post by jacque » Thu Apr 10, 2014 7:16 pm

What is hilited? If it is a list field, then you can use "set the hilitedline of fld x to 0" to remove the hilite. If it is a regular text field, then use "select empty".
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Hilite Property and Native Scroller

Post by jmburnod » Thu Apr 10, 2014 10:34 pm

Hi Louis,
I am not sure I really understand it
I think it was me who did not understand :D
Best regards
Jean-Marc
https://alternatic.ch

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

Re: Hilite Property and Native Scroller

Post by Jellobus » Fri Apr 11, 2014 5:17 am

Hi Jacque and Jean,

It is field supposed to work like a note app. text should not be hilited (or focused) because it sluggish when its scrolling. but just needed to be edited and can put insertion to any loc of field. Jean suggested me to cover up field with graphic so that hilite is successfully blocked but can't put insertion in the field. also I tried what Jacque suggested but I can't still put insertion into field with autohilite empty.

should I set autohilite true on mouseDown and set false on mouseUp for putting insertion ?

Louis

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Hilite Property and Native Scroller

Post by jacque » Fri Apr 11, 2014 5:47 am

AutoHilite and traversalOn must be true. Locktext must be false. Don't change them. On iOS you can remove the selection when the drag starts:

Code: Select all

on scrollerBeginDrag
  select empty
end scrollBeginDrag
This is for a native mobile scroller only, it won't work in the IDE. The handler must go in the same script that creates the native scroller.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: Hilite Property and Native Scroller

Post by Jellobus » Fri Apr 11, 2014 6:26 am

haha!

Thank you guise! problem solved :D

Cheers,

Louis

Post Reply