Hi,


I would like to create a simple text menuover class without success. If I define it with a class, the width and alignment is bad. I've tried for several hours...

Thanks for any suggestions.


This works:

<?xml version="1.0" encoding="UTF-8" ?> 
<canvas width="955" height="600">
<splash/>
<view id="view_main_topmenu">
	<view width="${felirattext.width+20}">
		<text name="felirattext" align="center" fontsize="10" fontstyle="bold" fgcolor="0x666666">
			about us
			<handler name="onmouseover">
				this.setColor(0xFFFFFF);
				parent.setAttribute('bgcolor','0x666666');;
			</handler>
			<handler name="onmouseout">
				this.setColor(0x666666);
				parent.setAttribute('bgcolor', null);;
			</handler>
		</text>
	</view>
</view>
</canvas>


this doesn't:

<?xml version="1.0" encoding="UTF-8" ?> 
<canvas width="955" height="600">
<splash/>
<include href=""/>
<view id="view_main_topmenu">
	<TopmenuButton menutext="about us"/>
</view>
</canvas>


  
classlib.lzx :
<library>
	<class name="TopmenuButton">
		<attribute name="menutext" type="string"/>
		<view width="${sometext.width+20}">
			<text width="100%" name="sometext" text="${classroot.menutext}" align="center" fontsize="10" fontstyle="bold" fgcolor="0x666666">
				<handler name="onmouseover">
					this.setColor(0xFFFFFF);
					parent.setAttribute('bgcolor','0x666666');;
				</handler>
				<handler name="onmouseout">
					this.setColor(0x666666);
					parent.setAttribute('bgcolor', null);;
				</handler>
			</text>
		</view>
	</class>
</library>

_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to