Mailing List
Home
Flash Pro
Extending Flash
Flash Macromedia Developer
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Components with detatched scrollbars

Components with detatched scrollbars

2004-02-17       - By Nigel Pegg

 Back
Reply:     1     2     3     4  




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:104524
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)