cLinkLabel color << Back



Joshua asked how he could change the text color of a cLinkLabel. He tried setting the property TextColor, but to no avail. Long story short, I came across this article, and viola, it works! Without furter ado, here is a working sample in VDF.

Use DfPanel.pkg
Use cLinkLabel.pkg

Object oPanel is a Panel
	Set Size to 50 150
	Object oLink is a cLinkLabel
		Set Size to 15 100
		Set Label to 'VDF Tips and Tricks'
		Set TextColor to clRed // It will work after adding the following code
		Procedure Page_Object Integer iPage // Add this procedure
			tWinLItem LItem 
			Forward Send Page_Object iPage
			Move (LIF_STATE iOr LIF_ITEMINDEX) to Litem.mask
        	Move LIS_DEFAULTCOLORS to Litem.state
        	Move LIS_DEFAULTCOLORS to Litem.stateMask
	        Send Windows_Message LM_SETITEM 0 (AddressOf(Litem))
		End_Procedure
	End_Object
End_Object

Start_UI





Free Web Hosting