Page 1 of 1

Text field appearance

Posted: Tue Mar 11, 2014 12:20 am
by thatkeith
Quick question:
In iOS, is there any way to have an editable text field that doesn't get an odd partial black border when someone taps into it?

Re: Text field appearance

Posted: Tue Mar 11, 2014 2:17 am
by Jellicle
Yes

Oh, you want to know how? Use a native multiline text control.

There is some information here about using native controls in LiveCode:

http://livecode.byu.edu/mobile/device-specific.php

When you get stuck ask for help :)

Gerry

Re: Text field appearance

Posted: Tue Mar 11, 2014 10:39 am
by splash21
thatkeith wrote:Quick question:
In iOS, is there any way to have an editable text field that doesn't get an odd partial black border when someone taps into it?
The threeD property of the field gives the strange looking partial border - try turning that off. The four properties to experiment with in the fields properties palette are;
  • showFocusBorder
  • threeD
  • showBorder
  • borderWidth
You can also turn the border off altogether with the showBorder property, then add a rounded rectangle behind the field for a more pleasing effect :D

Re: Text field appearance

Posted: Tue Mar 11, 2014 12:22 pm
by thatkeith
Thanks, both! :D
When I get my Xcode problem sorted (separate thread) I'll investigate all the permutations.

Re: Text field appearance

Posted: Tue Mar 11, 2014 2:18 pm
by thatkeith
@splash21, thanks for the nudge, the answer for a regular LiveCode Text Entry field is pleasingly simple: turn off showBorder. (Duh!)

@Jellicle, I like the sound of those native text controls! It doesn't suit today's specific requirement, but I'll come back to that later.

Re: Text field appearance

Posted: Tue Mar 11, 2014 2:25 pm
by thatkeith
A general question – a sincere one, not trolling:
Given that LiveCode does such a good job with emulating the appearance of controls in Mac OS, why doesn't it do better with emulating control appearances in iOS? It's amazing to be able to make stuff for iOS this easily, but buttons and similar things do look alarmingly odd.

Re: Text field appearance

Posted: Tue Mar 11, 2014 2:35 pm
by FourthWorld
thatkeith wrote:A general question – a sincere one, not trolling:
Given that LiveCode does such a good job with emulating the appearance of controls in Mac OS, why doesn't it do better with emulating control appearances in iOS? It's amazing to be able to make stuff for iOS this easily, but buttons and similar things do look alarmingly odd.
LiveCode's field objects are good for displaying text, but touch interactions are complex enough that it's best to leave editable fields for the OS to handle.

At the moment, OS-native controls are available via scripting, allowing us to use LiveCode fields to specify rects and other properties for the scripts we'll use to instantiate OS-native controls.

On the Road Map you'll find an item named "Themes", and if I understand it correctly part of that will include the automatic translation of LC fields to OS fields via properties rather than scripts:
http://livecode.com/community/roadmap/