Skip to main content
Inspiring
October 20, 2008
Question

Styling a LIST Box via AS

  • October 20, 2008
  • 2 replies
  • 2363 views
Hi --

I would like to make a simple change to the default List box. I want to
remove the border and change the type face. I have tried using the setStyle
on the instance but it does not work. I assume this is because I need to
reference the "text field" inside the list? Is there a SIMPLE way to do this
without creating a whole new CellRenderer class?

Thanks

Rich


This topic has been closed for replies.

2 replies

Inspiring
October 21, 2008
Hi --

This helps a lot with setting the text parameters, but what about the
borders? I want to be able to change the border style programmatically as
well.

Thanks

Rich


"Craig Grummitt" <webforumsuser@macromedia.com> wrote in message
news:gdj74k$hri$1@forums.macromedia.com...
> different components require different techniques for setting the text
> style.
> as the list uses renderers, you set the style of these renderers on the
> list
> using setRendererStyle. i go over the styling for all flash components
> http://forums.flashgods.org/styling-text-in-instances-of-components-using-textfo
> rmat-t76.html.
>


Craig Grummitt
Inspiring
October 21, 2008
the border of a list is defined graphically by its skin. if you want to change the border in all instances of your list, just edit the 'List_skin' clip in Component Assets/ListSkins.

If you only want to modify one instance of your list, duplicate List_skin, go to its Linkage properties and give it a Class - let's call it 'List_skin_alt'. It should default to flash.display.MovieClip as base class - leave that.

Now tell your the instance of your list to use this skin eg
Craig Grummitt
Inspiring
October 21, 2008
different components require different techniques for setting the text style. as the list uses renderers, you set the style of these renderers on the list using setRendererStyle. i go over the styling for all flash components at my blog.