Set a variable on the control, then access it later. The first parameter will be the object that called it.
PHP Code:
new GuiShowImgCtrl("Tool_RandomImage") {
width = 32;
height = 32;
image = "block.png";
this.title = "A random staff block";
thiso.catchEvent(this, "onMouseEnter", "onHoverOverTool");
}
PHP Code:
function onHoverOverTool(temp.control) {
Tool_SelectedText.text = temp.control.title;
}