Open GoogleCodeExporter opened 8 years ago
Following changes resolved it for me:
Step 1: Line 236
this.addChild(innerCanvas);
instead of rawChildern.addChild(innerCanvas);
Step 2: Turn off scrolling in the Constructor
public function ButtonScrollingCanvas1(){
super();
this.horizontalScrollPolicy = ScrollPolicy.OFF;
this.verticalScrollPolicy = ScrollPolicy.OFF;
this.mouseChildren = true;
this.mouseEnabled = false;
this.tabChildren = true;
this.tabEnabled = false;
}
Step 3 : Comment out the check for Scrollpolicy in method
enableOrDisableButtons()
protected function enableOrDisableButtons():void {
// if(this.horizontalScrollPolicy == ScrollPolicy.OFF) {
// leftButton.visible = rightButton.visible =
leftButton.includeInLayout = rightButton.includeInLayout = false;
// }
// else {
leftButton.visible = leftButton.enabled =
innerCanvas.horizontalScrollPosition > 0;
rightButton.visible = rightButton.enabled =
innerCanvas.horizontalScrollPosition < innerCanvas.maxHorizontalScrollPosition;
// }
// if(this.verticalScrollPolicy == ScrollPolicy.OFF) {
// upButton.visible = downButton.visible =
upButton.includeInLayout = downButton.includeInLayout = false;
// }
// else {
upButton.visible = upButton.enabled =
upButton.includeInLayout = innerCanvas.verticalScrollPosition > 0;
downButton.visible = downButton.enabled =
downButton.includeInLayout = innerCanvas.verticalScrollPosition <
innerCanvas.maxVerticalScrollPosition;
// }
positionButtons(this.width, this.height);
}
Original comment by vam6...@gmail.com
on 1 May 2009 at 3:47
I add button to the Panel's title bar but it can't be recognized by QTP. Any
idea?
Thanks.
Original comment by cht...@gmail.com
on 3 Aug 2009 at 2:17
The problem, specifically, is that rawChildren aren't recognized by the
automation
framework--here are my (simpler, I feel) changes to make this work:
override public function get numAutomationChildren():int
{
// Only the innerCanvas.
return 1;
}
override public function getAutomationChildAt( index:int ):IAutomationObject
{
return innerCanvas;
}
You'll have to import mx.automation.IAutomationObject, of course.
Original comment by salmanha...@gmail.com
on 16 Nov 2009 at 3:47
I haven't tried this, but you could probably do the exact same thing for the
Panel's
buttons, also--just remember that you're responsible for returning ALL immediate
children that can be tested, so you should probably return the regular
numChildren +
number of panel buttons as the numAutomationChildren and have
getAutomationChildAt
return the usual getChildAt until the index is actually higher than
numChildren, at
which point you should fall back to your new panel buttons.
Original comment by salmanha...@gmail.com
on 16 Nov 2009 at 3:49
Original issue reported on code.google.com by
vam6...@gmail.com
on 1 May 2009 at 3:07