6/17/2010 8:36:19 AM
Title:
attaching ruler in scrollpane
Hi,
I am developing design tool application in flash. I have problem regarding scrollpane component. In my application the scrollpane component is having scale displayed on top horizontally and left vertically.
I think I need to create a custom component in which I have to implement the ruler in the scrollpane component which shows the size in inches. But how should I do this I don’t have any idea please guide me. If anybody have solution regarding this.
Help will be really appreciated…
Thanks
Manoj sawant
6/17/2010 9:57:17 AM
you need to extend the verticalScrollBar and horizontalScrollBar and a method on updatedisplaylist method to draw a scale points on the scrollbar using graphics class. It will look something like this
< | | | | | | | | | > The vertical lines are the scale points in cm whatever unit you are using. You have to write some loop to draw points until the length is reached.
Inder
Points: 2620
Posts:0
6/18/2010 11:22:46 AM
create a scale component and add it as child to horizontal and verticalscrollbar, below actionscript example is just to demonstrate
// I am considering "scaleComponent" as button, you can use your component which shows scale instead of button
var scaleComponent:Button =new Button();
scaleComponent.label="some scale component";
//to place the scale just below scrollbar
scaleComponent.x=20;
scaleComponent.width=20;
scaleComponent.height=myContainer.horizontalScrollBar.width;
myContainer.horizontalScrollBar.addChild(scaleComponent)