Robertopriz’s Weblog

Impostare demoni che partano all’avvio

Posted in blogging to don't google by robertopriz on June 19, 2009

Per impostare demoni che partano all’avvio del sistema occorre aggiungerli con il comando:
rc-update add nome_del_programma default (es: rc-update add apache2 default)

rc-update -s              visualizza l’elenco dei programmi che partono all’avvio del computer
rc-update -v show   visualizza tutti i demoni sia che partano all’avvio oppure no

una guida interessante è qui: http://www.gentoo.org/doc/it/handbook/handbook-x86.xml?part=2&chap=4

Tagged with: , ,

Change default background color for selected item in TileList component

Posted in blogging to don't google by robertopriz on June 5, 2009

To change default selectedItem color you need to override a couple of methods extending TileList:

import flash.display.Graphics;
import flash.display.Sprite;

import mx.controls.TileList;
import mx.controls.listClasses.IListItemRenderer;

public class TileLsitEx extends TileList{

public function TileLsitEx()
{
super();
}
override protected function drawSelectionIndicator(indicator:Sprite, x:Number, y:Number,  width:Number, height:Number, color:uint,
itemRenderer:IListItemRenderer):void   {
var g:Graphics = indicator.graphics;
g.clear();
g.beginFill(0x3f4c6b);
g.lineStyle(2,0x6e7c9d);
g.drawRoundRect(x,y,itemRenderer.width,height,15,15);
g.endFill();
return;
}

override protected function drawHighlightIndicator(indicator:Sprite, x:Number, y:Number,width:Number, height:Number, color:uint,
itemRenderer:IListItemRenderer):void   {
return;
var g:Graphics = indicator.graphics;
g.clear();
g.beginFill(0x3f4c6b);
g.lineStyle(2,0x6e7c9d);
g.drawRoundRect(x,y,itemRenderer.width,height,15,15);
g.endFill();
}
}

Setting an ItemRenderer by ActionScript

Posted in blogging to don't google by robertopriz on June 4, 2009

Reminder:

to set an ItemRenderer by ActionScript you have to use ClassFactory:

var list:List = new List();
list.itemRenderer = new ClassFactory(MyItemRendererClass);
list.addChild(list1);