Помните я создавал тему про этот список?
Так вот
Я хочу добавить функцию в эти все шейпы , но код не работает ((
Кто поможет?
Так вот
Я хочу добавить функцию в эти все шейпы , но код не работает ((
Кто поможет?
PHP код:
$List = c("listBox1");
$scrollBox1 = c("scrollBox1");
$i = 0;
foreach($List->items->lines as $v) {
$v = trim($v);
if($v) {
$shape = new TShape;
$shape->parent = $scrollBox1;
$shape->x = 2;
$shape->y = 72*($i++);
$shape->w = 527;
$shape->h = 70;
$shape->brushColor = 0xf8a823;
$shape->penColor = 0xf8a823;
$shape->Name = 'shape__'.$i;
$shape->onMouseEnter = function(){
c('shape__'.$i)->brushColor = 0x80ff;//Вот тут не робит
c('shape__'.$i)->penColor = 0x80ff;// И тут тоже(( Япытался всавить всякие имена , но не получалось...
};
$leb = new TLabel;
$leb->caption = $v;
$leb->parent = $scrollBox1;
$leb->font->color = clWhite;
$leb->x = $shape->x + 2;
$leb->y = $shape->y + $shape->h /4 ;
$leb->Name = 'label__'.$i;
}
}