Text field appearance

Getting into LiveCode for iOS? Ask your questions here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 257
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?
Senior Lecturer, LCC (University of the Arts London)
Technical Editor, MacUser (1996-2015)
360 VR media specialist

Jellicle
Posts: 448
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
27" iMac, 27" Cinema Display, OS X Mavericks
iPhone 5 (plus a bunch of older devices for testing)
LiveCode Commercial license. Developer Program member.

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: 257
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.
Senior Lecturer, LCC (University of the Arts London)
Technical Editor, MacUser (1996-2015)
360 VR media specialist

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 257
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.
Senior Lecturer, LCC (University of the Arts London)
Technical Editor, MacUser (1996-2015)
360 VR media specialist

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 257
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.
Senior Lecturer, LCC (University of the Arts London)
Technical Editor, MacUser (1996-2015)
360 VR media specialist

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6838
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
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Post Reply

Return to “iOS Deployment”