Text field appearance

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Text field appearance

Post by thatkeith » Tue Mar 11, 2014 12:20 am

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?
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Text field appearance

Post by Jellicle » Tue Mar 11, 2014 2:17 am

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
14" MacBook Pro
Former LiveCode developer.
Now recovering.

splash21
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 369
Joined: Sun Dec 19, 2010 1:10 am
Location: UK
Contact:

Re: Text field appearance

Post by splash21 » Tue Mar 11, 2014 10:39 am

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
LiveCode Development & Training : http://splash21.com

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Re: Text field appearance

Post by thatkeith » Tue Mar 11, 2014 12:22 pm

Thanks, both! :D
When I get my Xcode problem sorted (separate thread) I'll investigate all the permutations.
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Re: Text field appearance

Post by thatkeith » Tue Mar 11, 2014 2:18 pm

@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.
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Re: Text field appearance

Post by thatkeith » Tue Mar 11, 2014 2:25 pm

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.
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

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

Re: Text field appearance

Post by FourthWorld » Tue Mar 11, 2014 2:35 pm

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/
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “iOS Deployment”