screen rect with group

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
vedus
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 153
Joined: Tue Feb 26, 2013 9:23 am

screen rect with group

Post by vedus » Mon Dec 09, 2013 12:23 am

in my app i have many fields so i need to scroll the fields up to see it when is covered by the keyboard.
my problem is,and i have attach the photos for more accurate solution :D
i use this code for my screen rect..

Code: Select all

local inputID

on openCard
   if environment() = "mobile" then
      /* create the UITextField control  and place its unique ID 
      into a local variable that I have called inputID */
      iphoneControlCreate "input"
      put the result into inputID
      
      /* the bounds of the UITextField are determind by the bounds the rect of grc 2 */
      iphoneControlSet inputID, "rect", the rect of grc 2
    
            set the loc of group "myscroll" to 512,561
   end if
end openCard

on keyboardActivated
      set the visible of grp mygrp2 to false
   move group "myscroll" to 512,200 in 100 millisecs

   iphoneControlSet inputID, "rect", the rect of grc 2
end keyboardActivated

on keyboardDeactivated
   move group "myscroll" to 512,561 in 200 millisecs
      set the visible of grp mygrp2 to true
  
   iphoneControlSet inputID, "rect", the rect of grc 2
end keyboardDeactivated
if you see in the first photo i have 2 colors green number(group-1) blue(group-2)
colorp.png
when i click in the blue screen the rect is working nice and smooth ,and because is up of others field from above screen (green) i use the visible to false.(i don't know if is right but is help for now.
now the problem..
when i click in the green screen is flickering.. :(
what i am do wrong?
i have try to group all the fields in the screen ,but the result was,when i click a every fld the screen move to the loc of group-1
iOS Simulator Screen shot Dec 9, 2013, 1.09.06 AM.png

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: screen rect with group

Post by Mark » Mon Dec 09, 2013 11:02 pm

Hi,

I don't understand it. The rect is working smooth and nice, you write. Which rect? What does it do?

You also write that it is flickering. What is flickering? The rect, the field, The keyboard or something else?

When you click in the green/blue screen, do you mean you're clicking in a field or somewhere else?

Why do you create only one native UITextField if you have so many fields?

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply