Using a nicer Button "Pressed" state (than the default square)

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

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Using a nicer Button "Pressed" state (than the default square)

Post by bogs » Wed Mar 21, 2018 2:34 pm

No problems, happens to me all the time :D
Image

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Using a nicer Button "Pressed" state (than the default square)

Post by teriibi » Wed Mar 21, 2018 9:45 pm

oK, one more try... :lol:
Is there anyway I can get rid of the "not suited" Square rectangle that appear when button is being pressed down and also after it has been released :?:

Its kind of ruining the Round shape design style.. :!: :x

LEFT: IDE TEST MODE / RIGHT : APP RUNNING ON DEVICE

Image
Attachments
remove rectangle.jpg

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Using a nicer Button "Pressed" state (than the default square)

Post by bogs » Wed Mar 21, 2018 10:26 pm

Are you saying it doesn't happen in the IDE or on the virtual device, but shows up on the actual device?
Image

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Using a nicer Button "Pressed" state (than the default square)

Post by teriibi » Wed Mar 21, 2018 10:54 pm

True,
When pressed in Test mode on the IDE, button just goes down, shadow disapear (or become very light blur) plus button s face also turns BLUE instead of the predefined GREY.
That s very fine for me, I would not change anything from this.

After building the APK, behaviors changes a bit.
running on the Device...
Butons face also turns Blue..but an Extra Added rectangle appears...wasting all the nice effects.

SO that square nevers shows on the IDE, only durring real APP use.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Using a nicer Button "Pressed" state (than the default square)

Post by bogs » Wed Mar 21, 2018 10:57 pm

Well then, we're going to need to get someone in that plays with androids, cause that aint me at all :D
Image

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Using a nicer Button "Pressed" state (than the default square)

Post by teriibi » Thu Mar 22, 2018 10:56 pm

oK, i ll share the stack here...
if any android users can test it...and see how "not to have" this square display that would be cool. :idea: :idea:
Tks for the return !
:P
Attachments
BUTTON WITH UNWANTED SQUARE.zip
(1.78 KiB) Downloaded 200 times

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

Re: Using a nicer Button "Pressed" state (than the default square)

Post by jacque » Fri Mar 23, 2018 8:28 pm

The square shadow on Android would be an engine bug, so you'd need to enter a bug report about that.

The workaround would be to create icon images, one for the normal state and a second one for the pressed state, and use those images as button icons instead of the shadow property.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: Using a nicer Button "Pressed" state (than the default square)

Post by FourthWorld » Fri Mar 23, 2018 8:57 pm

Getting a good look with buttons is easy, but not with the "standard" style, which was designed for desktop use and on mobile defaults to Motif, a look no one past 1996 wants to look at (long story as to how Motif became built into the engine, but for another time). :)

The current mix of widget options are attractive but cumbersome, with one for iOS and one for Android. They will be combined soon, hopefully with other platforms as well, into one object that looks great as soon as you drop it on your card.

In the meantime, buttons are so flexible it's easy to set the style to rectangle or roundRect, turn off the threeD border for a modern flat look, choose an appropriate background and hilite color, and be done.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Re: Using a nicer Button "Pressed" state (than the default square)

Post by teriibi » Fri Mar 23, 2018 9:59 pm

Thanks for all that info, I m going to file a Bug - as for your info - 3D was already deactivated.
I just used 2 lines of code and dont get the same result as what the IDE shows, so something is not "working right" ! its wysinwyg :lol:

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Using a nicer Button "Pressed" state (than the default square)

Post by bogs » Fri Mar 23, 2018 10:58 pm

FourthWorld wrote:
Fri Mar 23, 2018 8:57 pm
...defaults to Motif, a look no one past 1996 wants to look at...
Ahem, I beg your pardon! (Granted, I am unusual in the usage case basket).
Image

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

Re: Using a nicer Button "Pressed" state (than the default square)

Post by FourthWorld » Fri Mar 23, 2018 11:38 pm

teriibi wrote:
Fri Mar 23, 2018 9:59 pm
Thanks for all that info, I m going to file a Bug
Thanks. Please post the URL here so we can follow along.
as for your info - 3D was already deactivated.
The threeD is only one of the properties I mentioned. I still see a shadow there, so obviously something else is in play. I believe that something else is the style property. Looks like it's set to standard, but rectangle or roundRect will give you a flat, modern look.

EDIT: I just discovered a related thread that duplicates this discussion:
viewtopic.php?f=53&t=30777&p=165374#p165374

As I noted there, it seems you have the style set to something other than standard, so that much is good. I think what you're seeing is the focus border - turn off the showFocusBorder property and let us know if that goes away.

Going forward it would be helpful to post files and requests for additional help into an existing thread for that issue rather than creating a new one, so we don't need to post replied in multiple places and future readers will have a better chance of finding the thread with the more complete info.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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

Re: Using a nicer Button "Pressed" state (than the default square)

Post by FourthWorld » Fri Mar 23, 2018 11:41 pm

bogs wrote:
Fri Mar 23, 2018 10:58 pm
FourthWorld wrote:
Fri Mar 23, 2018 8:57 pm
...defaults to Motif, a look no one past 1996 wants to look at...
Ahem, I beg your pardon! (Granted, I am unusual in the usage case basket).
Well, truth be told I kinda like it too. But I wouldn't ship anything for anyone else to use with the Motif appearance active ('cept you, of course <g>).

In fact, I was on a kick a few years ago to reproduce the NeXT UI in LC. The Motif base is a great start; just add some dark gray, make some space-wasting vertical menu palettes, and in minutes you too can relive the wonder of the NeXT years. ;)
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Using a nicer Button "Pressed" state (than the default square)

Post by bogs » Sat Mar 24, 2018 5:38 am

Already (well, for years now) been reliving NeXT with gnuStep and afterStep (tend to prefer gnuStep though). Haven't you played with gorm at all? It is pure AWESOME.
Image

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

Re: Using a nicer Button "Pressed" state (than the default square)

Post by FourthWorld » Sat Mar 24, 2018 6:29 am

I haven't played with Gorm, but I looked it up. Nice. The UI management is a lot like LC. What we need next is data binding.

I wish there was a higher-res version of this video:
https://www.youtube.com/watch?v=j02b8Fuz73A
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Using a nicer Button "Pressed" state (than the default square)

Post by richmond62 » Sat Mar 24, 2018 10:43 am

If you're feeling "particularly kinky" you can download OPENstep here:

https://winworldpc.com/product/nextstep/4x

then try and find a functioning machine it will work on . . .

"This OS offered many unique things, in addition to the unique hardware it originally ran on."
[my bolding]

https://arstechnica.com/civis/viewtopic ... 6&t=472940

Mind you, how you'll manage to make LiveCode standalones that
will run on the thing is another question all together. 8)

I've been BAD for sometime now:
ILL.jpg

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”