Odd button hilite behavior

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

waprothero
Posts: 38
Joined: Tue Sep 20, 2011 5:01 pm
Contact:

Odd button hilite behavior

Post by waprothero » Tue Sep 20, 2011 5:05 pm

Hi, I created my first stack and put 2 buttons and a checkbox on the first card. However, when I click on either of the buttons or checkbox, all of them hilite when the mouse is down. This is a very odd behavior and I can't find a way to make it behave in the standard way, where only the button that is clicked responds to the mousedown state.

I am an ex-supercard user and have extensive lingo experience.
Bill Prothero

Klaus
Posts: 14184
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Odd button hilite behavior

Post by Klaus » Tue Sep 20, 2011 5:37 pm

Hi waprothero,

welcome to the forum! :D

Are there ANY scripts involved in the button,m card or stack that could interfere?
I hve never heard of this problem, so I'm a bit clueless!?


Best

Klaus

waprothero
Posts: 38
Joined: Tue Sep 20, 2011 5:01 pm
Contact:

Re: Odd button hilite behavior

Post by waprothero » Tue Sep 20, 2011 7:31 pm

Klaus:
Tnx for the reply. No, there are no scripts at all. I just drug a couple of buttons to a blank stack and fiddled around with the settings. Nothing seems to change that behavior.
Bill Prothero

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Odd button hilite behavior

Post by mwieder » Tue Sep 20, 2011 8:03 pm

waprothero-
2 buttons and a checkbox
What kind of buttons? Are you referring to radio buttons? If so, you should group them.
fiddled around with the settings
hmmm... can you be more explicit about that?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10309
Joined: Wed May 06, 2009 2:28 pm

Re: Odd button hilite behavior

Post by dunbarx » Wed Sep 21, 2011 3:21 am

The way to make several radio buttons act as a "one of many" hilite is either to group them, in which case only one at a time will be hilited, with any others unhiliting in a very nice way, or to script them all whereby they are explicitly hilited and unhilited under program control. IN LC, grouping is the easiest way, and easiest to manage.

Are you sure you are talking about radio buttons? As a SC user you are aware of what these are. These are the only style that has this useful property built-in upon grouping.

Select all your radio buttons and group them. Click on any one of them and it will hilite, and any others will unhilite. This is a particular behavior, different from checkboxes, where any and all buttons may be hilited at any time.



Craig Newman

waprothero
Posts: 38
Joined: Tue Sep 20, 2011 5:01 pm
Contact:

Re: Odd button hilite behavior

Post by waprothero » Wed Sep 21, 2011 7:06 am

Craig,
I probably haven't been very clear. But, I have 2 standard pushbuttons and one checkbox. Clicking on one affects the hilighting of the others. Since this was my first try with the app, my error is probably so obvious that you wouldn't think of it. Anyway, I'll spend more time with it in a day or so and go thru some of the tutorials. It's comforting to know that this isn't the expected behavior, which would be odd, indeed.
Bill
Bill Prothero

WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Re: Odd button hilite behavior

Post by WaltBrown » Wed Sep 21, 2011 7:16 am

I TRIED to make that happen and couldn't. If you have a stack which shows this behavior, could you download it?
Best regards,
Walt Brown
Omnis traductor traditor

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Odd button hilite behavior

Post by BarrySumpter » Wed Sep 21, 2011 8:36 am

I'd suggest starting from scratch again.

Can you tell us what OS and what LC version you're running?

You'll have to wait 7 days from start of membership
or 10 posts before you can upload on this board.

You can post code if and when you have some.


hth
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

waprothero
Posts: 38
Joined: Tue Sep 20, 2011 5:01 pm
Contact:

Re: Odd button hilite behavior

Post by waprothero » Wed Sep 21, 2011 8:07 pm

I'm on Mac OSX 10.6.8 and LiveCode 4.6.4. I make a new stack, then drag 2 pushbuttons and a checkbox to the stack I do nothing more. Then, when I go to "run" mode (click on the left arrow in the tool panel, the other buttons highlight. Seems an odd default behavior. I can't find any settings in the property inspector that change this behavior.

I can't upload a file for a few days yet, as I'm new to this forum.

Cheers,
Bill
Bill Prothero

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Odd button hilite behavior

Post by BarrySumpter » Wed Sep 21, 2011 8:30 pm

I'm on Mac OSX 10.6.8 and LiveCode 4.6.4.
Just installing this now.
What type of license are you using on your LC development environment?
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

waprothero
Posts: 38
Joined: Tue Sep 20, 2011 5:01 pm
Contact:

Re: Odd button hilite behavior

Post by waprothero » Wed Sep 21, 2011 8:50 pm

LiveCode Development Tools
Mobile Deployment : iOS
Desktop Deployment : Mac + Windows''

This is the info in the sales email I got. It's a regular developer's license for the MacOS.
Bill
Bill Prothero

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Odd button hilite behavior

Post by BarrySumpter » Thu Sep 22, 2011 12:15 am

Worked properly on my setup.

Licenses are Personal, Education, or Commercial.

I'll jump back on and upload my test stack to see if how it runs on yours.
waprotheroTest.livecode.zip
(776 Bytes) Downloaded 252 times
OK, see how that goes.

If mine still opens the same way then contact support describing the issue.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

waprothero
Posts: 38
Joined: Tue Sep 20, 2011 5:01 pm
Contact:

Re: Odd button hilite behavior

Post by waprothero » Thu Sep 22, 2011 6:31 pm

Barry:
I downloaded your stack and now I see the problem. Livecode assumes that the normal, unclicked state of a Mac button is white. I assumed that the normal, active state (not clicked on) would be blue. So, when I made a button, I copied the ones colored blue, expecting it to be in the normal, unclicked state. Then, when I clicked a blue button, it set all other buttons in the stack to white (the unclicked state), while the mouse was down on the blue button. This is not the expected OSX behavior. On a dialog box, there may be several buttons, and the one that is blue will be activated if the user presses return. Intuitively, I expected that dragging the blue colored pushbutton to the stack, it would be in its unclicked state. Hmm..

I wonder if there is a way to set up the buttons for this behavior, where the active state can be set to whatever color is specified, and the down state is another color. I'm sure it must be. But it does seem odd that a new button would be created in a state expected when the mouse is down on it.

Right now, I'm just exploring LiveCode's interface. I'm impressed with the number of interface widgets that are easily available.

Thanks,
Bill
Bill Prothero

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Odd button hilite behavior

Post by mwieder » Thu Sep 22, 2011 6:47 pm

Bill - you're referring to a default button rather than a simple pushbutton. You'll want to have only one default button on a card or dialog or whatever. Note that LC doesn't by default specify what happens when you press return, even if you've got a default button in sight. You'll have to put a returnKey and/or enterKey handler in the card script in order to handle that:

Code: Select all

on returnKey
  send "mouseUp" to button "theDefaultButton"
end returnKey

waprothero
Posts: 38
Joined: Tue Sep 20, 2011 5:01 pm
Contact:

Re: Odd button hilite behavior

Post by waprothero » Thu Sep 22, 2011 8:09 pm

What say we close this topic. I really need to spend some time with the docs before wasting your time on this. Thanks for all your help. But, now I'm feeling like I'm taking advantage of your guys' good will in helping a newbie who, at this very moment, has another project that needs to be finish, in Director.

Thanks again. This little test I've done also reassures me that there is a lot of help in the Livecode community, too. That is very encouraging. I'm looking forward to getting this Director project posted so I can spend more time with liveCode.

Regards,
Bill
Bill Prothero

Post Reply