  | |  | Components with detatched scrollbars | Components with detatched scrollbars
2004-02-17 - By Nigel Pegg
Back
Totally possible, but a little annoying to do. ScrollView has one method
that controls the layout, inexplicably called "doLayout() ". You 'll see that
it positions masks, scrollBars, etc. You 'd want to override that guy and
change the positions a bit.. like this :
function doLayout(Void):Void
{
super.doLayout();
// move the scrollBars around
hsb.move(something, something);
vsb.move(something, something);
// move the mask around
mask.move(something, something);
}
the other method you 'd need to fiddle with is getViewMetrics. You want to
return an object which has .left, .right, .top, and .bottom, which will be
the margins on each side (comprising the border and the scrollBars).
So, you 'd need to subclass any component you wanted to work this way, and
override these 2 methods. That would about do it. Not exactly seamless, but
it 's still easier than building your own datagrid (as much fun as that
is....).
nig
-- ---- ---- ---- ---- ---- --
Date: Mon, 16 Feb 2004 13:47:03 -0800
To: flashcoders@(protected)
From: Jason Hickner <jason@(protected) >
Subject: Components with detatched scrollbars
Message-ID: <40313A57.6050007@(protected) >
Hello!
Does anyone know of a way to use the flash mx 2004 components with their
scrollbars repositioned? For instance, a scrollpane with the vertical
scrollbar on the left side instead of the right, or a datagrid with its
scrollbars positioned somewhere else on screen other than directly
attached to the datagrid?
If that 's not possible, I 'll probably be making a custom scrollpane and
datagrid, which leads me to my second question - there 's no longer a
scrollbar component in mx 2004, but can you still instantiate one
somehow and use it for your own purposes? I 'd rather not re-create the
wheel if I don 't have to.
Thank you!
- Jason
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:104523
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|
 |