Box on selected line?

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
Vanceone
Posts: 37
Joined: Sat Dec 15, 2012 7:27 pm

Box on selected line?

Post by Vanceone » Wed Feb 04, 2015 9:01 pm

Everyone,

So I have a list field, and a selected line in it. It looks great, but when I build for the simulator (iOS 7.1) a small black box that looks like it is around the entire line shows up. There's no border on the field or anything. I've turned off all the border things I can think of.

I didn't think you could set a border on a single line in a field. Apparently you can? Or one shows up anyway?

Here's the code that controls the field's appearance:

Code: Select all

set the hGrid of fld "leaderBoard" to true
   set the textSize of fld "LeaderBoard" to 20
   set the textHeight of fld "LeaderBoard" to 30
   set the textshift of char 1 to -1 of fld "LeaderBoard" to -6
   set the threeDHilite of fld "LeaderBoard" to false
   set the hilitecolor of fld "LeaderBoard" to "227,227,227"
   set the borderColor of fld "LeaderBoard" to "193,193,193"
   set the showFocusBorder of fld "LeaderBoard" to false
   set the showBorder of fld "LeaderBoard" to false
   select line 2 of fld "LeaderBoard"
Any suggestions? Thanks!

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Box on selected line?

Post by Klaus » Wed Feb 04, 2015 10:01 pm

Hi Vanceone,

I think you got "trapped" by the fact that LC only (sic!) uses the ugly "Emulated Motif" Look and feel and not any native iOS look.
In the IDE check menu -> View -> Look and feel

But I am just guessing and may not have understood your problem correctly :D


Best

Klaus

Vanceone
Posts: 37
Joined: Sat Dec 15, 2012 7:27 pm

Re: Box on selected line?

Post by Vanceone » Thu Feb 05, 2015 12:02 am

[attachmnt=0]Boxed Screenshot.png[/attachment]Thanks Klaus. It's set to "Native look and feel"

I have attached a screenshot of what this field looks like in the simulator.
Boxed Screenshot.png
That dark box on choice three is what I want to get rid of; ideally I'd like to just have that grey highlight.

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Box on selected line?

Post by Klaus » Thu Feb 05, 2015 6:23 pm

Hi Vanceone,
Vanceone wrote: It's set to "Native look and feel"
I meant ath LC does set the "Look and Feel" automatically to "Emulated Mofif" on Android and iOS,
because it does not support native "Look and Feel" on these mobile platforms!

To see the ugliness directly while developing, set the "Look and Feel" on your Mac or Windows box to "Emulated Motif" (and cry). 8)

That's why most people "roll their own", means they use images or graphics groups for their user elements.
There are also some commercial "Themes", see here http://mobgui.com and here http://tmtools.tactilemedia.com/tmcontrol2/


Best

Klaus

Vanceone
Posts: 37
Joined: Sat Dec 15, 2012 7:27 pm

Re: Box on selected line?

Post by Vanceone » Fri Feb 06, 2015 4:39 am

Thanks Klaus. Unfortunately MobGui doesn't work in LiveCode 7 (at best, mediocre) and tmcontrols is iOS only. :(

So how could I fix that black box, or roll my own, as it were? I've already changed the vast majority of the look; what function controls that black box? It only appears initially; when you click elsewhere it disappears, which leads me to believe it is a focus issue or border on a hi lighted control, but nothing seems to control it. Focusing on "nothing" in the preOpenCard handler doesn't help.

Any ideas?

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Box on selected line?

Post by Simon » Fri Feb 06, 2015 5:24 am

Hi Vanceone,
There are a couple of properties you missed

Code: Select all

set the traversalOn of fld "LeaderBoard" to false
set the threeD of fld "LeaderBoard" to false
and your last line should be

Code: Select all

 set the hilitedLine of fld "LeaderBoard" to 2
Does that clean it up on mobile?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Vanceone
Posts: 37
Joined: Sat Dec 15, 2012 7:27 pm

Re: Box on selected line?

Post by Vanceone » Fri Feb 06, 2015 5:38 am

Thanks Simon. Cautiously it appears to have fixed it. I saw it show up briefly in the IDE but not yet in the simulator. So thank you very much!

I wish we had a "cheat sheet" of "Do this on Mobile to clean off the Motif theme." For each control, because buttons suffer too. And the progress bar? Is there a way to fix that so it doesn't look like it is straight out of Doom, circa 1992? I rolled my own on the progress bar, but it was harder than it needed to be.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Box on selected line?

Post by Simon » Fri Feb 06, 2015 6:08 am

Hi Vanceone,
If you look in the property inspector for a field you just tick everything off. Watch out because you have to refresh the property inspect after you change things via code.
That with

Code: Select all

on mouseUp
   put the properties of fld "LeaderBoard"  into myArray
   combine myArray using return and ":"
   breakpoint
end mouseUp
Showed me what was missing.

With those 2 things you can find out how to turn off everything via code on any control.
Then you'd be cool 'cause you'd post a stack so everyone would know how.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Box on selected line?

Post by jacque » Fri Feb 06, 2015 6:44 pm

Vanceone wrote: Unfortunately MobGui doesn't work in LiveCode 7 (at best, mediocre) and tmcontrols is iOS only. :(
Actually TMControls works on Android, it's just that most of the themes are built around iOS conventions. But I've pulled out some of the individual controls and used them without any problems.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”