Badcreature / mad-components

Automatically exported from code.google.com/p/mad-components
0 stars 0 forks source link

switch.mouseEnabled = false doesn't appear to work #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

var switch:UISwitch = UISwitch(UI.findViewById("switch"));
switch.mouseEnabled = false;
switch.state = true;

What is the expected output? 
Switch is set to true through code and the user cannot change the state.

What do you see instead?
mouseEnabled has no effect and the user can still change the state of the 
switch.

What version of the product are you using? On what operating system?
0.5.3

Please provide any additional information below.
I've tested it thoroughly this time.

Regards

Rich

Original issue reported on code.google.com by scr33nsh...@gmail.com on 6 Jul 2011 at 12:27

GoogleCodeExporter commented 8 years ago
mouseEnabled is ignored within a scrolling container.  (Such as <viewFlipper>, 
<scrollVertical>, <scrollXY>, <list>, etc...)

Since version 0.5.4, I've introduced a new property called "clickable", which 
behaves like mouseEnabled (as far as MadComponents is concerned) inside 
scrolling containers.

If you want to build your own custom component -  extend MadSprite, which 
includes the clickable property code.

Original comment by doc.andr...@gmail.com on 8 Jul 2011 at 10:19