Page 1 of 2
Odd button hilite behavior
Posted: Tue Sep 20, 2011 5:05 pm
by waprothero
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.
Re: Odd button hilite behavior
Posted: Tue Sep 20, 2011 5:37 pm
by Klaus
Hi waprothero,
welcome to the forum!
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
Re: Odd button hilite behavior
Posted: Tue Sep 20, 2011 7:31 pm
by waprothero
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.
Re: Odd button hilite behavior
Posted: Tue Sep 20, 2011 8:03 pm
by mwieder
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?
Re: Odd button hilite behavior
Posted: Wed Sep 21, 2011 3:21 am
by dunbarx
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
Re: Odd button hilite behavior
Posted: Wed Sep 21, 2011 7:06 am
by waprothero
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
Re: Odd button hilite behavior
Posted: Wed Sep 21, 2011 7:16 am
by WaltBrown
I TRIED to make that happen and couldn't. If you have a stack which shows this behavior, could you download it?
Best regards,
Re: Odd button hilite behavior
Posted: Wed Sep 21, 2011 8:36 am
by BarrySumpter
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
Re: Odd button hilite behavior
Posted: Wed Sep 21, 2011 8:07 pm
by waprothero
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
Re: Odd button hilite behavior
Posted: Wed Sep 21, 2011 8:30 pm
by BarrySumpter
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?
Re: Odd button hilite behavior
Posted: Wed Sep 21, 2011 8:50 pm
by waprothero
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
Re: Odd button hilite behavior
Posted: Thu Sep 22, 2011 12:15 am
by BarrySumpter
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.
OK, see how that goes.
If mine still opens the same way then contact support describing the issue.
Re: Odd button hilite behavior
Posted: Thu Sep 22, 2011 6:31 pm
by waprothero
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
Re: Odd button hilite behavior
Posted: Thu Sep 22, 2011 6:47 pm
by mwieder
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
Re: Odd button hilite behavior
Posted: Thu Sep 22, 2011 8:09 pm
by waprothero
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