Hi,

I remember having to hack this in Flash for a list component, you should be able to set the style, but you need to use GrantSkinners workaround http://gskinner.com/blog/archives/2007/05/variable_scroll.html

Edit your skin, then include Grant's fl.controls.List or whatever - that includes Scrollbar code.

    Set your width using the setStyle props.

_list.setStyle("scrollBarWidth",40);
_list.setStyle("scrollArrowHeight", 40);

HTH

Glen

On 04/09/2011 21:24, lists...@fo.com wrote:
What is the approach to expand a DataGrid vertical scrollbar's
width (from the standard 15 pixels, to 44 or so, for touchscreens)
in pure AS3 / Flash CS 5?

It looks easy in Flex now
http://www.switchonthecode.com/tutorials/flex-fun-advanced-datagrid-topics


But in Flash/AS3,
directly editing
library>  Component Assets>  ScrollBarSkins>  Scrolltrack_skin
as recommended at
http://help.adobe.com/en_US/ActionScript/3.0_UsingComponentsAS3/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7f4a.html
to change its color and width
does change the color and the width in the library,
but only the color -- not the width at runtime.


Widening scrollThumb_upSkin, et al in the library does show them altered when 
run,
but cut off at the stock 16 pixel width of DataGrid scrolltrack.

Any thoughts?

thanks


// basically straight from livedocs...

import fl.controls.DataGrid;
import fl.controls.dataGridClasses.DataGridColumn;
import fl.data.DataProvider;
import fl.events.DataGridEvent;

function setup ():void
{
     var aDg:DataGrid = new DataGrid();
     addChild(aDg);
     aDg.verticalScrollPolicy="on";

     var nameDGC:DataGridColumn = new DataGridColumn("name");
     nameDGC.sortOptions = Array.CASEINSENSITIVE;
     var scoreDGC:DataGridColumn = new DataGridColumn("score");
     scoreDGC.sortOptions = Array.NUMERIC;
     aDg.addColumn(nameDGC);
     aDg.addColumn(scoreDGC);
     var aDP_array:Array = new Array({name:"clark", score:3135},
{name:"Bill", score:803}, {name:"fc", score:03}, {name:"Bruce",
score:403}, {name:"Peter", score:25})
     aDg.dataProvider = new DataProvider(aDP_array);

     aDg.rowCount = aDg.length - 2;
     aDg.width = 200;

     // also does nothing
     aDg.verticalScrollBar.width = 60;
}
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to